Jump to content
  • Advertisement
Sign in to follow this  
X Abstract X

OpenGL Transparency Issues

This topic is 2953 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm working on building a GUI for my game and I'm having some trouble with getting transparency to work. My problem is that the alpha values I specify for my geometry seem to get ignored.

I have a basic GLSL fragment shader that takes the fragment color and multiplies it by the texel color.

I have tried a bunch of different OpenGL blending functions, some of them change the appearance of my geometry (some make it transparent a bit) but none of them are affected by the alpha values of the color attribute.

I have tried enabling/disabling depth testing (I don't know if this matters).

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by X Abstract X
I have a fragment shader that takes the fragment color
Is this a GL-built-in colour, or an output from the vertex shader? If the latter, where does the vertex shader get the colour from?
Quote:
...are affected by the alpha values of the color attribute.
Which colour attribute are you setting? A material colour or a vertex colour?

Share this post


Link to post
Share on other sites
It's the output from my vertex shader.

The color IS getting set, because my geometry DOES show the color mixed in with the texture, just not the alpha component.

For the GUI, I use glVertexAttrib4f() to set the color, VBOs are used in other parts of the engine.

I'm setting the vertex color.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!