# ETC1 texture opacity

I'm using the cocos2d-x engine and want to support etc1 on android devices for my game. For ETC1 i'm using the mali compression tool, and GLSL.

Everything is working, but I can't change the opacity of my sprites anymore.

my alpha blending is GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA . can anyone help?

Here are one of my Textures with rgb tex + alpha tex

attribute vec4 a_position;
attribute vec2 a_texCoord;
attribute vec4 a_color;

varying vec4 v_fragmentColor;
varying vec2 v_texCoord;
varying vec2 v_texCoord2;

uniform sampler2D tex1;

void main()
{
gl_Position = CC_PMatrix * a_position; //CC_PMatrix comes from engine
v_fragmentColor = a_color;
v_texCoord = a_texCoord;
v_texCoord2 = v_texCoord;
}


varying vec4 v_fragmentColor;
varying vec2 v_texCoord;
varying vec2 v_texCoord2;

uniform sampler2D u_texture1; //alpha texture

void main()
{
//CC_Texture0 comes from cocos2d-x engine and represents the rgb
vec3 tex = texture2D(CC_Texture0, v_texCoord).rgb;
float alpha = texture2D(u_texture1, v_texCoord).r;

gl_FragColor = vec4(tex,alpha);
}

• From the Wikipedia description of ETC1: "It does not support the compression of images with Alpha components, although there are work-arounds for this." Are you using one of these techniques to work around this limitation? If so, which one? – DMGregory Jul 14 '15 at 14:40
• Yes. I'm using Methode 2 – jeromintus Jul 14 '15 at 14:43
• Can you show us a screengrab, your source textures (RGB & alpha), and the shader code you're using to render them? – DMGregory Jul 14 '15 at 14:50
• updated my post above – jeromintus Jul 15 '15 at 7:48