Difference between revisions of "ShaderLamp (CMS)"

From The Official Visionaire Studio: Adventure Game Engine Wiki
(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...")
 
Line 9: Line 9:
 
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.
 
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.
+
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 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.
+
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.
  
  
 
== Examples ==
 
== Examples ==
=== Enable ===
+
=== Spotlight ===
 
...
 
...
 
<syntaxhighlight>
 
<syntaxhighlight>
 
...
 
...
 
</syntaxhighlight>
 
</syntaxhighlight>
=== Disable ===
+
=== Point Light ===
 
...
 
...
 
<syntaxhighlight>
 
<syntaxhighlight>
Line 45: Line 45:
 
! style="text-align:left" | Name !! style="text-align:left" | Description
 
! style="text-align:left" | Name !! style="text-align:left" | Description
 
|-
 
|-
| [[media:shaderBlur.zip|shaderBlur.zip]] || A working .ved file, complete with resources. Check out the readme.txt file for instructions.
+
| n/a || A working .ved file, complete with resources. Check out the readme.txt file for instructions.
 
|}{{toc}}
 
|}{{toc}}

Revision as of 13:57, 9 May 2015

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


Examples

Spotlight

...

...

Point Light

...

...


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
n/a A working .ved file, complete with resources. Check out the readme.txt file for instructions.