mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2024-12-29 03:19:44 +00:00
12 lines
168 B
GLSL
12 lines
168 B
GLSL
#if @reverseZ
|
|
uniform float linearFac;
|
|
#endif
|
|
|
|
float getLinearDepth(in float z, in float viewZ)
|
|
{
|
|
#if @reverseZ
|
|
return linearFac*viewZ;
|
|
#else
|
|
return z;
|
|
#endif
|
|
} |