Hello,
I'm having a problem when creating textures with the Mali texture compression tool. I'm following this Mali tutorial to create a separate alpha mask that handles the alpha channel from an ETC1 texture using Method 2 as described. I managed to get this working but it appears that little white lines or artifacts are appearing round the edges where the alpha parts of the image meet the opaque parts. My current blend function is (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA). This was the only blend function that would allow this to method to work. Maybe there is another blend function that would change this and rectify the problem. Or maybe some other setting in OpenGL, I aslo posted this on the OpenGl forums.
I think the problem may go away or be less noticeable if the first generated texture that contains the real RGB values has black for the transparent areas instead of white. Mali Compression tool sets the alpha areas to white and there is no option to change this in the tool. I also noticed that in the texture compression tool Texture Packer. When you generate .pkm files with that tool it sets the alpha areas to to black, which further supports this theory. As it is such a simple change, it would be great if the people who develop Mali could realease an update that allows you to set the colour of the transparaent areas in the generated image.
If anyone has any other insight on this problem that would be great.
EXTRA INFO:
OpenGL ES 2.0 (only supports etc1 not etc2)
Quick ways to implement this kind of thing depend on the nature of the texture you're working with before conversion, and how many files you need to convert,
If it's just one or two and you have the file with the transparency, using an alpha aware graphics tool like gimp you should easily create blurred offset layers behind the original, merge them all together, then mask it by the alpha channel of the original picture.
If you've got a lot of files, I'd recommend cracking out libpng and writing a tool to load in files and automatically propagate color values into semi-transparent pixels from adjacent more opaque ones.
-Stacy