danini-the-panini/mittsu-opengl

View on GitHub
lib/mittsu/opengl/shader/chunks/logdepthbuf_vertex.glsl

Summary

Maintainability
Test Coverage
#ifdef USE_LOGDEPTHBUF

    gl_Position.z = log2(max( EPSILON, gl_Position.w + 1.0 )) * logDepthBufFC;

    #ifdef USE_LOGDEPTHBUF_EXT

        vFragDepth = 1.0 + gl_Position.w;

#else

        gl_Position.z = (gl_Position.z - 1.0) * gl_Position.w;

    #endif

#endif