Global Command: shaderUniform
From The Official Visionaire Studio: Adventure Game Engine Wiki
Revision as of 10:36, 19 May 2023 by EK (talk | contribs) (Created page with "Set uniforms for shader. {| class="ts" |- | style="width:15%" | Related functions | shaderCompile | Global Command: shaderSetOptions|shade...")
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})