Wrong alpha premultiplication on iOS Safari
Problem The PNG supports 4 channels called RGBA, and we usually use the alpha channel for opacity.
But there is a different usecase to the alpha channel, the emissive intensity. The finally color will be added to the emissive color * emissive intensity.
In the fragment shader it would look like:
1 2 3 4 5 6 7 8 precision mediump float; uniform sampler2D texture; varying vec2 uv; void main () { vec4 color = texture2D(texture, uv); vec3 emissiveColor = vec3(1, 0, 0); // let red be the emissive color gl_FragColor = vec4(color.