1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-01 03:21:41 +00:00
OpenMW/files/shaders/compatibility/depthclipped.frag
2023-02-25 11:03:39 -08:00

20 lines
363 B
GLSL

#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;
if (alpha < alphaRef)
discard;
// DO NOT write to color!
// This is in charge of only updating depth buffer.
}