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

GLSL and alpha problems

Started by Daishim Aug 1, 2007 at 4:14 PM 3 replies 1.8k views
Original Post
Daishim
Daishim
I'm having trouble with the alpha channel. I'm using GLSL and framebuffer objects for rendering to texture with alpha components. Whenever I read back the data, the highest order 8-bits (alpha component) are all 1s, however the other components are correct.. This occurs when rendering to a framebuffer object as well as the main framebuffer. Using any GLSL fragement program, even as simple as just an empty function with "gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);" will yield all 0s except for the alpha component's bits which are all 1s. The textures (color buffers) for the framebuffer object are RGBA, as well as the main framebuffer being RGBA. Anyone have any idea what I may have done, or not done, to cause this?

I know only that which I know, but I do not know what I know.
Daishim
Daishim
No blending is enabled.

I know only that which I know, but I do not know what I know.
dpadam450
dpadam450
Isn't there an alpha buffer? I mean blending just says well I know its a color, maybe .2 of this one and .8 of this one. Just guessing.
NBA2K, Madden, Maneater, Killing Floor, Sims 
Daishim
Daishim
Yes. I'm trying to retain the actual alpha value, and not blend.

I know only that which I know, but I do not know what I know.

Topic Locked

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

Sign in to reply to this topic.