<<< Rotating light | Index | Diffuse lighting in fragment shader >>> |
GLSL smooth type qualifier is one of the interpolation qualifiers in GLSL. The value is interpolated in a perspective-correct fashion. This is the default if no qualifier is present.
// Declaration in vertex shader smooth out vec4 interpolated_color; // Declaration in fragment shader smooth in vec4 interpolated_color;
Other choices are flat and noperspective. See http://www.opengl.org/wiki/Type_Qualifier_(GLSL) article for details.
<<< Rotating light | Index | Diffuse lighting in fragment shader >>> |