From 660ca343fa3bfffbc07cca21dfbb880a847edddf Mon Sep 17 00:00:00 2001 From: Rod Kay Date: Thu, 4 May 2023 21:40:07 +1000 Subject: [PATCH] opengl.geometry.lit_textured_x2.fragment_shader: Apply alpha value to surface_Color, when combining textures. --- 3-mid/opengl/assets/shader/lit_textured_x2.frag | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/3-mid/opengl/assets/shader/lit_textured_x2.frag b/3-mid/opengl/assets/shader/lit_textured_x2.frag index 0d44dc1..23a6454 100644 --- a/3-mid/opengl/assets/shader/lit_textured_x2.frag +++ b/3-mid/opengl/assets/shader/lit_textured_x2.frag @@ -108,8 +108,9 @@ main() // surface_Color += texture (Textures [i], // frag_Coords); - surface_Color.rgb += texture (Textures [i], - frag_Coords).rgb * (1.0 - Fade [i]); + surface_Color.rgb += texture (Textures [i],frag_Coords).rgb + * texture (Textures [i],frag_Coords).a + * (1.0 - Fade [i]); surface_Color.a = max (surface_Color.a, texture (Textures [i], frag_Coords).a);