[core][ios][android][macos] Use premultiplied image directly for RasterTile and ImageSource, un-premultiply in the shader for blending
This commit is contained in:
@@ -45,6 +45,12 @@ void main() {
|
||||
// read and cross-fade colors from the main and parent tiles
|
||||
vec4 color0 = texture2D(u_image0, v_pos0);
|
||||
vec4 color1 = texture2D(u_image1, v_pos1);
|
||||
if (color0.a > 0.0) {
|
||||
color0.rgb = color0.rgb / color0.a;
|
||||
}
|
||||
if (color1.a > 0.0) {
|
||||
color1.rgb = color1.rgb / color1.a;
|
||||
}
|
||||
vec4 color = mix(color0, color1, u_fade_t);
|
||||
color.a *= u_opacity;
|
||||
vec3 rgb = color.rgb;
|
||||
|
||||
Reference in New Issue
Block a user