Shader variables
Posted: Sun Feb 15, 2015 3:24 pm
Hi,
this question is mainly for Ville and Kjell but I think that everybody can profit from answer(s).
Could you please make a summary of all shader variables (types, names and short semantics) currently supported by ZGE?
These I know:
Is this list correct and complete?
How, for instance, to obtain color of particle (including alpha)?
Rado1
this question is mainly for Ville and Kjell but I think that everybody can profit from answer(s).
Could you please make a summary of all shader variables (types, names and short semantics) currently supported by ZGE?
These I know:
Code: Select all
uniform mat4 modelViewProjectionMatrix;
uniform mat4 modelViewMatrix;
uniform mat4 projectionMatrix;
uniform mat3 normalMatrix;
uniform mat4 textureMatrix; //Holds the current texture matrix (updated via RenderText or Material.TextureX/Y/Scale properties
uniform vec4 globalColor; //The current color that is set using RenderSetColor or Material.Color
attribute vec4 position; //vertex position
attribute vec4 color; //vertex color (does it work?)
attribute vec2 texCoord; //vertex texture coordinate
attribute vec3 normal; //vertex normal
// textures in fragment shader
uniform sampler2D tex1;
uniform sampler2D tex2;
uniform sampler2D tex3;
...
How, for instance, to obtain color of particle (including alpha)?
Rado1