Difference between revisions of "ShaderLamp (CMS)"

From The Official Visionaire Studio: Adventure Game Engine Wiki
Line 7: Line 7:
  
  
With the openGL shader, it is entirely possible to apply multiple light sources to each of your scenes. These light sources can either be static or dynamic. Static light sources would be fixed in place & their parameters will always stay the same, whereas dynamic light sources could be pinned to something that is moving, such as: a character or object in the scene & / or the parameters of the light could also be adjusted over time, to create atmospheric lighting such as flickering, sway or a shift in the intensity or reach of the overall light.
+
...
 
 
There are two different types of light available: 1. spotlight & 2. point light.
 
 
 
Finally I would just like to point out that you have to manually declare the amount of light sources on the scene, by declaring them with the '''shaderActivateLighting()''' function.
 
 
 
Finally finally, light sources can actually be bound to a loop using the '''bind()''' function, or you can create your own loop using the '''mainLoop''' event handler or by creating a loop inside of the editor using the '''jump to x''' action part inside of an action block.
 
  
  

Revision as of 15:28, 9 May 2015

Name Type
shaderLamp(index, type, pos, targ, falloff, ac, dc, df, exp, cutoff) Execution


...


Examples

Spotlight

...

...

Point Light

...

...


Syntax Breakdown

Name Type Description
index integer (number) The index number to assign to the light source. Index starts at 0.
type integer (number) The type of light you want to create. 0 = spotlight. 1 = point light.
pos point (x, y, z) The position of the light source. Z controls how close the light source is to the screen. Lower value = closer.
targ point (x, y, z) The target position of the light source. The light travels from pos to targ. Only for point lighting; set {0,0,0} for spotlight.
falloff ... ...

index, type, pos, targ, falloff, ac, dc, df, exp, cutoff

Resources

Name Description
n/a A working .ved file, complete with resources. Check out the readme.txt file for instructions.