Shader Uniform Descriptors
Each uniform descriptor entry is a lua table with the following fields:
- name: Name of the uniform. Must match the name used in GLSL program.
- type: Type of data this uniform holds. Must be one of Shader.CFLOAT,Shader.CFLOAT4,Shader.CINT,Shader.CMATRIX or Shader.CTEXTURE
- mult: The number of elements if this uniform is an array - vertex: Boolean which must be set to true if the uniform is defined in the vertex shader, and false if it is defined in the fragment shader.
- sys: Indicate that this uniform has a special meaning and should be set by Gideros when appropriate. Current possible values are:
- Shader.SYS_WVP: this uniform of type CMATRIX will hold the World/View/Projection matrix.
- Shader.SYS_COLOR: this uniform of type CFLOAT4 will hold the constant color to be used to draw the shape.
- Shader.SYS_WORLD: this uniform of type CMATRIX will hold the World transform matrix.
- Shader.SYS_WIT: this uniform of type CMATRIX will hold the World Inverse Transpose matrix.
- Shader.SYS_TEXTUREINFO: this uniform of type CFLOAT4 will hold information about the texture used in a particle shader.
- Shader.SYS_PARTICLESIZE: the uniform of type CFLOAT will hold the particle size to use in a particle shader.
The uniforms must be declared in the order they appear in the constant block of the HLSL version of the shader. If shaders are only GLSL, then the order is not relevant.