1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-09 12:42:11 +00:00
OpenMW/files/shaders/depth.glsl

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

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
}