Fix missing vertex color in gles2 driver
Also make sure all vertex colors are applied after colorization is done
This commit is contained in:
parent
b77160527c
commit
a36276811e
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user