ShaderUniform

From The Official Visionaire Studio: Adventure Game Engine Wiki

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