1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-06 00:55:50 +00:00
OpenMW/files/shaders/compatibility/depthclipped.frag

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

20 lines
363 B
GLSL
Raw Normal View History

2022-05-14 01:58:00 +00:00
#version 120
uniform sampler2D diffuseMap;
varying vec2 diffuseMapUV;
varying float alphaPassthrough;
void main()
{
float alpha = texture2D(diffuseMap, diffuseMapUV).a * alphaPassthrough;
const float alphaRef = 0.499;
2022-05-14 01:58:00 +00:00
if (alpha < alphaRef)
discard;
// DO NOT write to color!
2023-02-25 19:03:39 +00:00
// This is in charge of only updating depth buffer.
2022-05-14 01:58:00 +00:00
}