ShaderLamp (CMS)
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. |