Translucent sprites (opacity < 255) are very common, so using a custom shader instead of the full blown effect one helps a lot, especially on mobile.
11 lines
171 B
GLSL
11 lines
171 B
GLSL
|
|
uniform sampler2D texture;
|
|
uniform lowp float alpha;
|
|
|
|
varying vec2 v_texCoord;
|
|
|
|
void main()
|
|
{
|
|
gl_FragColor = texture2D(texture, v_texCoord);
|
|
gl_FragColor.a *= alpha;
|
|
}
|