Skip to content

Commit 1139945

Browse files
authored
Merge pull request #1028 from qw-ctf/fog-glitch
MODERN: Guarantee that fog doesn't multiply color with zero.
2 parents e993dab + 6a4950f commit 1139945

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/glsl/draw_world.fragment.glsl

+5-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,11 @@ void main()
140140
if ((Flags & EZQ_SURFACE_ALPHATEST) == EZQ_SURFACE_ALPHATEST && texColor.a < 0.5) {
141141
discard;
142142
}
143-
// Avoid black artifacts at border between texture and transparency visible in fog
143+
#endif
144+
145+
#if defined(DRAW_ALPHATEST_ENABLED) || defined(DRAW_FOG)
146+
// Avoid black artifacts at border at edge of fence textures and guarantee that
147+
// fog function doesn't multiply with zero.
144148
texColor = vec4(texColor.rgb, 1.0);
145149
#endif
146150

0 commit comments

Comments
 (0)