Difference between revisions of "ShaderBlur (CMS)"

From The Official Visionaire Studio: Adventure Game Engine Wiki
Line 11: Line 11:
  
 
== Examples ==
 
== Examples ==
Example 1: set blur amount
+
=== Enable ===
 +
Set blur amount
 
<syntaxhighlight>
 
<syntaxhighlight>
 
shaderBlur(0.8, 3000) -- blur the screen by .8 over 3 seconds
 
shaderBlur(0.8, 3000) -- blur the screen by .8 over 3 seconds
 
shaderBlur(0.8, 0) -- blur the screen by .8 instantly
 
shaderBlur(0.8, 0) -- blur the screen by .8 instantly
 
</syntaxhighlight>
 
</syntaxhighlight>
 
+
=== Disable ===
 
+
Turn blur off
Example 2: turn blur off
 
 
<syntaxhighlight>
 
<syntaxhighlight>
 
shaderBlur(0, 3000) -- focus screen back to default over 3 seconds
 
shaderBlur(0, 3000) -- focus screen back to default over 3 seconds

Revision as of 15:46, 30 September 2014

Name Type
shaderBlur(value, delay) Execution


Allows the user to blur or focus the camera/screen over a specified amount of time. The shader toolkit is needed for this function to work.


Examples

Enable

Set blur amount

shaderBlur(0.8, 3000) -- blur the screen by .8 over 3 seconds
shaderBlur(0.8, 0) -- blur the screen by .8 instantly

Disable

Turn blur off

shaderBlur(0, 3000) -- focus screen back to default over 3 seconds
shaderBlur(0, 0) -- focus screen back to default instantly


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