Hi Everybody,
I've got a 32 bit translucent TGA texture which I want to render on a simple quat. But cant make it to get rendered properly. Parts where my texture is transparent do not get rendered as transparent. What is the common problem with this approach?
When I specify alpha value with glColor(...) it makes my quad translucent, but how to make alpha value to come from the texture?
I turned on blending, generated texture with GL_RGBA and GL_UNSIGNED_BYTE mode. Don't know what I'm doing wrong.
Any help is appreciated.
Thank you,
Ruben
Translucent RGBA texture
You need to post more information and code. My initial guess though is that your texture doesn't have an alpha channel. Check that the internal format, and not just the source data format, is actually a format with an alpha channel.
How would I check the internal format?
When I open the image with Photoshop i can see that it has an alpha channel.
When I open the image with Photoshop i can see that it has an alpha channel.
it will have an alpha value regardless
just shade your models with only alpha, and you can see if your alpha channel is completely 1.0, or actually has values like this:
gl_FragColor = vec4(my_frag_color[3]);
if its completely white (or black), then it is as rob said above most likely =)
it could also be you forgot to enable blending: glEnable(GL_BLEND);
just shade your models with only alpha, and you can see if your alpha channel is completely 1.0, or actually has values like this:
gl_FragColor = vec4(my_frag_color[3]);
if its completely white (or black), then it is as rob said above most likely =)
it could also be you forgot to enable blending: glEnable(GL_BLEND);
it will have an alpha value regardless
just shade your models with only alpha, and you can see if your alpha channel is completely 1.0, or actually has values like this:
gl_FragColor = vec4(my_frag_color[3]);
it could also be you forgot to enable blending: glEnable(GL_BLEND);
just shade your models with only alpha, and you can see if your alpha channel is completely 1.0, or actually has values like this:
gl_FragColor = vec4(my_frag_color[3]);
it could also be you forgot to enable blending: glEnable(GL_BLEND);
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement