ShaderUniform
From The Official Visionaire Studio: Adventure Game Engine Wiki
Revision as of 21:28, 30 September 2014 by Vis apiuser (talk) (Created page with "==shaderUniform== <div class="command-min-version-info">Available since: <span class="command-min-version">v4.0</span></div> <div class="command-doc">Set uniforms for shader...")
Contents
shaderUniform
Available since: v4.0
Set uniforms for shader
Lua Syntax:
shaderUniform(shader_number, name, value)
Arguments
shader_number
- int -
name
- "string" - option name, use _i_ prefix to set integer values as lua has only numbers
value
- VARIANT - value, supports integer, float, vec2, vec3, vec4, mat4
Flags
Return Values
None.
Examples
Example 1: set uniforms
shaderUniform("iTime",shader_iTime*0.1)
shaderUniform("shader_coeff",{shader_coeff0,shader_coeff1,shader_coeff2,shader_coeff3})