ShaderColorize (CMS)

From The Official Visionaire Studio: Adventure Game Engine Wiki
Revision as of 13:25, 16 August 2014 by AFRLme (talk) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Function History

Available since v4.0


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

Additional Info

I don't think this function is currently working correctly as it should fade from current hue to specified hue & instead it cycles through hue values like a rainbow.


Syntax:

shaderColorize(hue, strength, delay)


Example 1: set colorize amount

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


Example 2: 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


Arguments

hue: float (number)
Define the hue target; number between 0 & 1 (red > yellow > green > blue > pink > red)

strength: float (number)
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)


Flags

none


Return

none


Relevant Pages: to add...