Computergrafik
GLSL Built-Ins
← GLSL Parameter | ● | GLSL Texturen →
Vordefinierte GLSL Vertex-Shader Attribut-Parameter:
| Name | Purpose |
| gl_Vertex | 4D vector representing the vertex position |
| gl_Normal | 3D vector representing the vertex normal |
| gl_Color | 4D vector representing the vertex color |
| gl_MultiTexCoordX | 4D vector representing the texture coordinate of texture unit X |
| usw. |
Vordefinierte GLSL Uniform-Parameter:
| Name | Purpose |
| gl_ModelViewMatrix | 4×4 Matrix representing the model-view matrix. |
| gl_ModelViewProjectionMatrix | 4×4 Matrix representing the model-view-projection matrix. |
| gl_NormalMatrix | 3×3 Matrix representing the inverse transpose model-view matrix. This matrix is used for normal transformation. |
Vordefinierte GLSL Varyings:
| Name | Purpose |
| gl_FrontColor | 4D vector representing the primitives front color |
| gl_BackColor | 4D vector representing the primitives back color |
| gl_TexCoord[X] | 4D vector representing the Xth texture coordinate |
Vordefinierte Datentypen für die Shader Ausgänge:
| Name | Purpose |
| gl_Position | 4D vector representing the final processed vertex position. Only available in vertex shader. |
| gl_FragColor | 4D vector representing the final color which is written in the frame buffer. Only available in fragment shader. |
| gl_FragDepth | float representing the depth which is written in the depth buffer. Only available in fragment shader. |
← GLSL Parameter | ● | GLSL Texturen →