Changes

Jump to: navigation, search

Howto:Shader programming in FlightGear

504 bytes added, 13:20, 27 March 2010
m
Varyings
== Varyings ==
An interface between vertex and fragment shaders is provided by varying variables: vertex shaders compute values per vertex and fragment shaders compute values per fragment.
The value of a varying variable defined in a vertex shader, will be interpolated (perspective-correct) over the primitve being rendered and the interpolated value in the fragment shader can be accessed.
 
Varying variables can only be used with the data types float, vec2, vec3, vec4, mat2, mat3, mat4. (and arrays of them too.)
 
* varying vec4 gl_FrontColor // vertex
* varying vec4 gl_BackColor; // vertex
2,561
edits

Navigation menu