Global Command: shaderUniform

From The Official Visionaire Studio: Adventure Game Engine Wiki

Set uniforms for shader.

Related functions shaderCompile | shaderSetOptions


Syntax

shaderUniform(shader_number, name, value)


Parameters

Parameter Type Description
shader_number integer
name string Option name. Use i prefix to set integer values (as lua has only numbers).
value integer/float/vec2/vec3/vec4/mat4


Return values

none


Examples

Example1:

shaderUniform("iTime", shader_iTime*0.1)
shaderUniform("shader_coeff", {shader_coeff0, shader_coeff1, shader_coeff2, shader_coeff3})