Rechercher une page de manuel
glslf.3Cg
Langue: en
Version: 355248 (ubuntu - 24/10/10)
Section: 3 (Bibliothèques de fonctions)
Sommaire
NAME
glslf - OpenGL fragment profile for the OpenGL Shading Lanauge (GLSL)SYNOPSIS
glslf
DESCRIPTION
This OpenGL profile corresponds to the per-fragment functionality introduced by the OpenGL Shading Language.The compiler output for this profile conforms to the language grammar defined by the OpenGL Shading Language specification.
3D API DEPENDENCIES
Requires support for OpenGL 2.0.OpenGL Extension Specifications
http://www.opengl.org/documentation/specs/version2.0/glspec20.pdf http://www.opengl.org/documentation/glsl/ http://www.opengl.org/registry/doc/GLSLangSpec.Full.1.20.8.pdf
PROFILE OPTIONS
None.DATA TYPES
The Cg half and fixed data types are both mapped to float because GLSL lacks first-class half and fixed data types.SEMANTICS
VARYING INPUT SEMANTICS
Binding Semantics Name Corresponding Data GLSL Equivalent
COLOR Primary color (float4) gl_Color COLOR0 COL0 COL
COLOR1 Secondary color (float4) gl_SecondaryColor COL1
TEXCOORD Texture coordinate set 0 gl_TexCoord[0] TEXCOORD# Texture coordinate set # gl_TexCoord[#] TEX#
FACE Front/back facing (+1/-1) gl_FrontFacing
UNIFORM INPUT SEMANTICS
Sixteen texture units are supported:
Binding Semantic Name Corresponding Data
TEXUNIT0 Texture unit 0 TEXUNIT1 Texture unit 1 ... TEXUNIT15 Texture unit 15The Cg profiles for GLSL provide access to all the uniform constants and variables documented in Section 7.4 (Built-in Constants) and 7.5 (Built-in Uniform State) respectively of the OpenGL Shading Language specification found at:
http://www.opengl.org/documentation/glsl/ http://www.opengl.org/registry/doc/GLSLangSpec.Full.1.20.8.pdfExample:
glslf void main(float4 color : COLOR, out float4 ocol : COLOR) { ocol.xyz = mul(gl_NormalMatrix, color.xyz); ocol.w = 1; }
OUTPUT SEMANTICS
The following standard fragment output semantics are supported:
Binding Semantics Name Corresponding Data GLSL Equivalent
COLOR Output color (float4) gl_FragColor COLOR0 COL0 COL
COLOR0-COLOR7 Output color (float4) gl_FragData[n] COL0-COL7 for draw buffers 0 to 7
DEPTH Output depth (float) gl_FragDepth DEPR
STANDARD LIBRARY ISSUES
Fragment program Cg standard library routines are available.SEE ALSO
glslv, glslgContenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre