1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-07 12:54:00 +00:00
OpenMW/files/shaders/blended_depth_postpass_fragment.glsl
2022-07-31 18:51:42 -07:00

20 lines
398 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 a post-pass of transparent objects in charge of only updating depth buffer.
}