Howto:Shader programming in FlightGear: Difference between revisions

m
Line 105: Line 105:


Vertex Shaders take application geometry and per-vertex attributes as input and transform the input data in some meaningful way.
Vertex Shaders take application geometry and per-vertex attributes as input and transform the input data in some meaningful way.
* A vertex shader MUST write to gl_Position
* A vertex shader CAN write to gl_PointSize, gl_ClipVertex
* gl_Vertex is an attribute supplying the untransformed vertex coordinate
* gl_Position is an special output variable for the transformed vertex coordinate


Common tasks for a vertex shader include:
Common tasks for a vertex shader include:
2,561

edits