1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-04 02:41:19 +00:00
OpenMW/files/shaders/depth.glsl
2021-08-04 17:39:11 -07:00

12 lines
173 B
GLSL

#if @reverseZ
uniform float linearFac;
#endif
float getLinearDepth(in vec4 viewPos)
{
#if @reverseZ
return linearFac*viewPos.z;
#else
return gl_Position.z;
#endif
}