mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-04 02:41:19 +00:00
12 lines
173 B
GLSL
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
|
|
} |