Difference between revisions of "ShaderBlur (CMS)"
From The Official Visionaire Studio: Adventure Game Engine Wiki
(Created page with "<div class="toccolours mw-collapsible mw-collapsed tbl-ds"> <span class="bold">Function History</span> <div class="mw-collapsible-content"> <div class="alt-bg">Available since...") |
|||
(14 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | + | {| class="ts" style="width:100%" | |
− | + | |- | |
− | + | ! style="text-align:left" | Name !! style="text-align:left" | Type | |
− | + | |- | |
− | + | | shaderBlur(value, delay) || Execution | |
+ | |} | ||
− | Allows the user to blur or focus the camera/screen over a specified amount of time. | + | Allows the user to blur or focus the camera/screen over a specified amount of time. ''The [[Shader_(CMS)|shader toolkit]] is required for this function to work''. |
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | == Examples == | |
+ | === Enable === | ||
+ | Set blur amount | ||
<syntaxhighlight> | <syntaxhighlight> | ||
− | shaderBlur( | + | shaderBlur(0.8, 3000) -- blur the screen by .8 over 3 seconds |
+ | shaderBlur(0.8, 0) -- blur the screen by .8 instantly | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | === Disable === | |
− | + | Turn blur off | |
− | |||
<syntaxhighlight> | <syntaxhighlight> | ||
− | shaderBlur( | + | shaderBlur(0, 3000) -- focus screen back to default over 3 seconds |
− | shaderBlur( | + | shaderBlur(0, 0) -- focus screen back to default instantly |
</syntaxhighlight> | </syntaxhighlight> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | == Syntax Breakdown == | ||
+ | {| class="ts" style="width:100%" | ||
+ | |- | ||
+ | ! style="text-align:left" | Name !! style="text-align:left" | Type !! style="text-align:left;width:80%" | 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 == | |
− | + | {| class="ts" | |
− | + | |- | |
− | + | ! 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. |
− | |} | + | |}{{toc}} |
Latest revision as of 21:26, 7 November 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 required 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). |
Resources
Name | Description |
---|---|
shaderBlur.zip | A working .ved file, complete with resources. Check out the readme.txt file for instructions. |