ShaderLamp (CMS)

From The Official Visionaire Studio: Adventure Game Engine Wiki
Revision as of 13:54, 9 May 2015 by AFRLme (talk) (Created page with "{| class="ts" style="width:100%" |- ! style="text-align:left" | Name !! style="text-align:left" | Type |- | shaderLamp(index, type, pos, targ, falloff, ac, dc, df, exp, cutoff...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Name Type
shaderLamp(index, type, pos, targ, falloff, ac, dc, df, exp, cutoff) Execution


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 2 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.


Examples

Enable

...

...

Disable

...

...


Syntax Breakdown

Name Type Description
value float (decimal) The amount to blur the screen by; recommended value somewhere between 0 & 20.
delay integer (number) The amount of time to blur/focus the screen over; in milliseconds (ms).


Resources

Name Description
shaderBlur.zip A working .ved file, complete with resources. Check out the readme.txt file for instructions.