2013-12-19 19:32:50 +01:00

17 lines
300 B
GLSL

varying vec2 depth;
void main()
{
#if LINEAR_RANGE
float finalDepth = depth.x;
#else
float finalDepth = depth.x / depth.y;
#endif
// just smear across all components
// therefore this one needs high individual channel precision
gl_FragColor = vec4(finalDepth, finalDepth, finalDepth, 1);
}