GL_FRAGDEPTH(3G)

    .SH "NAME" gl_FragDepth - establishes a depth value for the current fragment
    .SH "DECLARATION"

            out highp
            float
            gl_FragDepth
        ;

    .SH "DESCRIPTION"
        .PP Available only in the fragment language, gl_FragDepth is an output variable that is used to establish the depth value for the current fragment. If depth buffering is enabled and no shader writes to gl_FragDepth, then the fixed varname value for depth will be used (this value is contained in the z component of gl_FragCoord()) otherwise, the value written to gl_FragDepth is used. If a shader statically assigns to gl_FragDepth, then the value of the fragment's depth may be undefined for executions of the shader that take that path. That is, if the set of linked fragment shaders statically contain a write to gl_FragDepth, then it is responsible for always writing it.

    .SH "VERSION SUPPORT"
        .TS allbox tab(:); l l l l l. T{ gl_FragDepth T}:T{ T}:T{ T}:T{ T}:T{ T}

    .SH "SEE ALSO"
        .PP gl_FragCoord()

    .SH "COPYRIGHT"
        .PP Copyright © 2011-2015 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.

COPYRIGHT
Copyright © 2011-2015 Khronos Group