1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-21 12:53:53 +00:00
openmw/files/shaders/blended_depth_postpass_fragment.glsl

20 lines
396 B
Text
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.5;
if (alpha < alphaRef)
discard;
// DO NOT write to color!
// This is a post-pass of transparent objects in charge of only updating depth buffer.
}