Skip to content

Commit fe74ff0

Browse files
committed
fix player overlay rendering with colored fog
1 parent 26e3bb0 commit fe74ff0

File tree

1 file changed

+11
-5
lines changed
  • src/main/resources/assets/minosoft/rendering/shader/entities/player

1 file changed

+11
-5
lines changed

src/main/resources/assets/minosoft/rendering/shader/entities/player/player.fsh

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#version 330 core
1515

1616
#define FOG
17-
#define DISABLE_ALPHA_DISCARD
1817

1918
out lowp vec4 foutColor;
2019

@@ -31,9 +30,16 @@ void main() {
3130
if (finTintColor.a == 0.0f) discard;
3231
applyDefaults();
3332
applyTint();
34-
applyTexel();
35-
if (finAllowTransparency > 0u) {
36-
if (foutColor.a < 0.5f) discard;
33+
vec4 texel = getTexture(finTextureArray, vec3(finTextureUV, finTextureLayer));
34+
if (finAllowTransparency != 0u) {
35+
if (texel.a < 0.5f) discard;
36+
} else {
37+
texel.a = 1.0f;
3738
}
38-
foutColor.a = 1.0f;
39+
40+
foutColor *= texel;
41+
42+
#ifdef FOG
43+
fog_set();
44+
#endif
3945
}

0 commit comments

Comments
 (0)