Shader/Defined Uniforms

< Shader
Revision as of 02:50, 26 July 2013 by Alfonse (Talk | contribs) (fragment shader uniforms.)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Fragment Shaders define the following uniforms.

struct gl_DepthRangeParameters
    float near;
    float far;
    float diff;
uniform gl_DepthRangeParameters gl_DepthRange;

This struct provides access to the glDepthRange near and far values. The diff​ value is the far​ value minus the near​ value. Do recall that OpenGL makes no requirement that far​ is greater than near​.