ViroShaderUniform
ViroShaderUniform is a type that defines the data structure for passing dynamic variables from JavaScript/TypeScript into your custom shader code.
| Property | Type | Description | Required |
|---|---|---|---|
| name | string | The variable name as it appears in your GLSL code. | required |
| type | float | vec2 | vec3 | vec4 | mat4 | sampler2D | The GLSL data type. Supported types include: - float, vec2, vec3, vec4 (numbers or arrays of numbers). - mat4 (4x4 matrix). - sampler2D (image textures). | required |
| value | any | The actual value being passed (e.g., a number, an array, or a reference to a texture). | required |
Updated 5 days ago