Computergrafik

GLSL Built-Ins

GLSL Parameter | | GLSL Texturen

Vordefinierte GLSL Vertex-Shader Attribut-Parameter:

NamePurpose
gl_Vertex4D vector representing the vertex position
gl_Normal3D vector representing the vertex normal
gl_Color4D vector representing the vertex color
gl_MultiTexCoordX4D vector representing the texture coordinate of texture unit X
usw. 

Vordefinierte GLSL Uniform-Parameter:

NamePurpose
gl_ModelViewMatrix4×4 Matrix representing the model-view matrix.
gl_ModelViewProjectionMatrix4×4 Matrix representing the model-view-projection matrix.
gl_NormalMatrix3×3 Matrix representing the inverse transpose model-view matrix. This matrix is used for normal transformation.

Vordefinierte GLSL Varyings:

NamePurpose
gl_FrontColor4D vector representing the primitives front color
gl_BackColor4D vector representing the primitives back color
gl_TexCoord[X]4D vector representing the Xth texture coordinate

Vordefinierte Datentypen für die Shader Ausgänge:

NamePurpose
gl_Position4D vector representing the final processed vertex position. Only available in vertex shader.
gl_FragColor4D vector representing the final color which is written in the frame buffer. Only available in fragment shader.
gl_FragDepthfloat representing the depth which is written in the depth buffer. Only available in fragment shader.


GLSL Parameter | | GLSL Texturen

Options: