Good morning GDSE,
I am loading a TGA using loadTGA function found in superbible 4th edition source code. Here is how the image looks in Gimp
You can see I have enabled alpha channel in Gimp, I exported this to TGA image, without RLE compression, and 32bpp. But when I load the image in my OpenGL code, the part of the image which is supposed to be transparent is seen white.
Where I must be going wrong? The type of TGA is set to GL_RGBA, 32 bpp.
Here is my Fragment shader code.
out_fragColor = (vec4( ambAndDiff, 1 ) * texColor) + vec4(spec,0.0);
I have calculated ambAndDiff and spec values earlier using ADS phong shading, and both of them are vec3. Let me know if you also want to view the TGA loading code. :)