|
|
- notes = "The shader does not need to be active to update its uniforms.\n\nThe following type combinations are supported:\n\n<table>\n <thead>\n <tr>\n <td>Uniform type</td>\n <td>LÖVR type</td>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>`float`, `int`</td>\n <td>`number`</td>\n </tr>\n <tr>\n <td>TODO</td>\n <td>SORRY</td>\n </tr>\n </tbody> </table>\n\nUniform variables declared as `float`s must be sent a single number, whereas uniforms declared as `vec4`s must be sent a table containing 4 numbers, etc. Note that uniforms declared as mat4s can be sent a `mat4` object.\n\nAn error is thrown if the uniform does not exist or is not used in the shader. The `Shader:hasUniform` function can be used to check if a uniform variable exists.\n\n`Blob`s can be used to pass arbitrary binary data to Shader variables.",
|
|
|
+ notes = "The shader does not need to be active to update its uniforms.\n\nThe following type combinations are supported:\n\n<table>\n <thead>\n <tr>\n <td>Uniform type</td>\n <td>LÖVR type</td>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>float</td>\n <td>number</td>\n </tr>\n <tr>\n <td>int</td>\n <td>number</td>\n </tr>\n <tr>\n <td>vec2</td>\n <td>{ x, y }</td>\n </tr>\n <tr>\n <td>vec3</td>\n <td>{ x, y, z } or vec3</td>\n </tr>\n <tr>\n <td>vec4</td>\n <td>{ x, y, z, w }</td>\n </tr>\n <tr>\n <td>ivec2, ivec3, ivec4</td>\n <td>{ ...numbers }</td>\n </tr>\n <tr>\n <td>mat2, mat3</td>\n <td>{ ...numbers }</td>\n </tr>\n <tr>\n <td>mat4</td>\n <td>{ x, y, z, w, ... } or mat4</td>\n </tr>\n <tr>\n <td>sampler2D, sampler3D, samplerCube, sampler2DArray</td>\n <td>Texture</td>\n </tr>\n <tr>\n <td>image2D, image3D, imageCube, image2DArray</td>\n <td>Texture</td>\n </tr>\n </tbody> </table>\n\nUniform arrays can be wrapped in tables or passed as multiple arguments.\n\nAn error is thrown if the uniform does not exist or is not used in the shader. The `Shader:hasUniform` function can be used to check if a uniform variable exists.\n\n`Blob`s can be used to pass arbitrary binary data to Shader variables.",
|