1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-01 03:21:41 +00:00
OpenMW/files/shaders/depth.glsl

12 lines
168 B
Plaintext
Raw Normal View History

2021-06-01 19:15:25 +00:00
#if @reverseZ
uniform float linearFac;
#endif
float getLinearDepth(in float z, in float viewZ)
2021-06-01 19:15:25 +00:00
{
#if @reverseZ
return linearFac*viewZ;
2021-06-01 19:15:25 +00:00
#else
return z;
2021-06-01 19:15:25 +00:00
#endif
}