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

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

16 lines
268 B
Plaintext
Raw Normal View History

2023-02-25 19:03:39 +00:00
#ifndef LIB_PARTICLE_OCCLUSION
#define LIB_PARTICLE_OCCLUSION
void applyOcclusionDiscard(in vec3 coord, float sceneDepth)
{
#if @reverseZ
if (coord.z < sceneDepth)
discard;
#else
if (coord.z * 0.5 + 0.5 > sceneDepth)
discard;
#endif
}
#endif