Skip to main content
GameDev.net gamedev.net
🔒 Locked

Transparency Issues

Started by X Abstract X Jul 18, 2010 at 8:44 AM 1 replies 1k views
Original Post
X Abstract X
X Abstract X
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).
Hodgman
Hodgman
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?
X Abstract X
X Abstract X
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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.