diff --git a/data/shaders/ge_shaders/alphatest.frag b/data/shaders/ge_shaders/alphatest.frag index 1b1088140..77ec0b4cd 100644 --- a/data/shaders/ge_shaders/alphatest.frag +++ b/data/shaders/ge_shaders/alphatest.frag @@ -13,7 +13,6 @@ void main() vec4 tex_color = sampleMeshTexture0(f_material_id, f_uv); if (tex_color.a * f_vertex_color.a < 0.5) discard; - tex_color.xyz *= f_vertex_color.xyz; if (f_hue_change > 0.0) { @@ -23,5 +22,6 @@ void main() tex_color = vec4(new_color.r, new_color.g, new_color.b, tex_color.a); } + tex_color.xyz *= f_vertex_color.xyz; o_color = vec4(tex_color.xyz, 1.0); } diff --git a/data/shaders/irrlicht/COGLES2FixedPipeline.fsh b/data/shaders/irrlicht/COGLES2FixedPipeline.fsh index 7297ef28c..0973a058c 100644 --- a/data/shaders/irrlicht/COGLES2FixedPipeline.fsh +++ b/data/shaders/irrlicht/COGLES2FixedPipeline.fsh @@ -69,6 +69,7 @@ vec4 renderSolid() max(old_hsv.y, saturation)), vec2(mask_step, mask_step)); Color.rgb = hsvToRgb(vec3(new_xy.x, new_xy.y, old_hsv.z)); } + Color.rgb *= varVertexColor.rgb; Color.a = 1.0; } else @@ -76,7 +77,6 @@ vec4 renderSolid() Color = varVertexColor; Color.a = 1.0; } - return Color; } @@ -150,8 +150,7 @@ vec4 renderTransparent() vec4 renderTransparentVertexColor() { - vec4 Color = varVertexColor; - + vec4 Color = vec4(1.0, 1.0, 1.0, 1.0); if(uTextureUsage0) { Color *= texture2D(uTextureUnit0, varTexCoord0); @@ -162,6 +161,7 @@ vec4 renderTransparentVertexColor() vec3 new_color = hsvToRgb(vec3(new_xy.x, new_xy.y, old_hsv.z)); Color.rgb = vec3(new_color.r, new_color.g, new_color.b); } + Color *= varVertexColor; } return Color; diff --git a/data/shaders/sp_alpha_test.frag b/data/shaders/sp_alpha_test.frag index 374adc072..22dcd404e 100644 --- a/data/shaders/sp_alpha_test.frag +++ b/data/shaders/sp_alpha_test.frag @@ -18,7 +18,6 @@ void main(void) { discard; } - col.xyz *= color.xyz; if (hue_change > 0.0) { @@ -27,6 +26,7 @@ void main(void) vec3 new_color = hsvToRgb(vec3(new_xy.x, new_xy.y, old_hsv.z)); col = vec4(new_color.r, new_color.g, new_color.b, col.a); } + col.xyz *= color.xyz; #if defined(Advanced_Lighting_Enabled) vec4 layer_2 = sampleTextureLayer2(uv);