As I understand it; by default all bitmaps will will get the alpha channel premultiplied in Android if loaded using BitmapFactory.
I have a 32bit bitmap(.bmp) where the alpha channel has a gloss map and the rgb is a specular map.
I found out that I can load the bitmap without being premultiplied using the bitmap option:
opts.inPremultiplied = false;
When I render the alpha channel of the texture like this in the shader:
gl_FragColor.rgb = vec3(texture.a);
The resulting mesh is all white and not shades of gray as expected.
I upload the texture with this method:
GLUtils.texImage2D(GL_TEXTURE_2D, 0, GL_RGBA, image, 0);
I have also tried using this approach
as well with the same result although I might have done something wrong there.
Can anyone spot where I have gone wrong or what else I need to do?
Thanks on beforehand!