Graphics Reference
In-Depth Information
uniform mat3 gl_NormalMatrix; // transpose of inverse of
// the upper leftmost 3x3 of
// gl_ModelViewMatrix
uniform mat4 gl_ModelViewMatrixInverse;
uniform mat4 gl_ProjectionMatrixInverse;
uniform mat4 gl_ModelViewProjectionMatrixInverse;
uniform mat4 gl_TextureMatrixInverse[gl_MaxTextureCoords];
uniform mat4 gl_ModelViewMatrixTranspose;
uniform mat4 gl_ProjectionMatrixTranspose;
uniform mat4 gl_ModelViewProjectionMatrixTranspose;
uniform mat4 gl_TextureMatrixTranspose
[gl_MaxTextureCoords];
uniform mat4 gl_ModelViewMatrixInverseTranspose;
uniform mat4 gl_ProjectionMatrixInverseTranspose;
uniform mat4 gl_ModelViewProjectionMatrixInverseTranspose;
uniform mat4 gl_TextureMatrixInverseTranspose
[gl_MaxTextureCoords];
Normal scaling. If your application does its own normal scaling instead of
relying on the normalization operation, you can access that normal scaling
factor:
uniform float gl_NormalScale;
Front and back clipping planes . When you specify your projection in OpenGL,
you specify the front and back clipping planes, and hence the depth of these
planes. This data is available to your shaders:
struct gl_DepthRangeParameters
{
float near; // n
float far; // f
float diff; // f - n
};
uniform gl_DepthRangeParameters gl_DepthRange;
Clip planes . OpenGL allows you to define clipping planes in your scene by
specifying the equation of the plane as four real numbers. This data is avail-
able to your shaders:
uniform vec4 gl_ClipPlane[gl_MaxClipPlanes];
Search WWH ::




Custom Search