ShaderColorize (CMS): Difference between revisions

From The Official Visionaire Studio: Adventure Game Engine Wiki
No edit summary
No edit summary
Line 7: Line 7:




Allows the user to colorize the screen over a specified amount of time. ''The [[Shader_(CMS)|shader toolkit]] is needed for this function to work''.
Allows the user to colorize the screen over a specified amount of time. ''The [[Shader_(CMS)|shader toolkit]] is required for this function to work''.




Line 35: Line 35:
|-
|-
| delay || integer (number) || The amount of time to colorize the screen over; in milliseconds (ms).
| delay || integer (number) || The amount of time to colorize the screen over; in milliseconds (ms).
|}
== Resources ==
{| class="ts"
|-
! style="text-align:left" | Name !! style="text-align:left" | Description
|-
| [[media:shaderColorize.zip|shaderColorize.zip]] || A working .ved file, complete with resources. Check out the readme.txt file for instructions.
|}
|}
{{toc}}
{{toc}}

Revision as of 01:37, 1 October 2014

Name Type
shaderColorize(hue, strength, delay) Execution


Allows the user to colorize the screen over a specified amount of time. The shader toolkit is required for this function to work.


Examples

Enable

Set colorize amount

shaderColorize(0, 1, 3000) -- colorize screen red over 3000 milliseconds
shaderColorize(0, 1, 0) -- colorize screen red instantly

Disable

Turn colorize off

shaderColorize(0, 0, 3000) -- restore colorize value back to default over 3000 milliseconds
shaderColorize(0, 0, 0) -- restore colorize value back to default instantly


Syntax Breakdown

Name Type Description
hue float (decimal) Define the hue target; number between 0 & 1 (red > yellow > green > blue > pink > red).
strength float (decimal) The amount to colorize the screen by; recommended value between 0 & 1 (possible to go over 1, but might generate strange artifacts).
delay integer (number) The amount of time to colorize the screen over; in milliseconds (ms).


Resources

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