Multiplying a fragment against values in the alpha channel
I'm curious how I'd go about causing pixels being drawn in a quad to be blended by alpha values already in the color buffer.
To clarify, say I've written out a mask of sorts into the alpha channel of the color buffer. Then I'm drawing a billboarded quad over the scene and I want the alpha value of each fragment of that quad to be multiplied by the alpha of the corresponding fragment in the color buffer.
Is this possible through the fixed function pipeline, or barring that, can a fragment program read from the color buffer ( specifically from the corresponding value in the color buffer )?
Thanks,
To clarify, say I've written out a mask of sorts into the alpha channel of the color buffer. Then I'm drawing a billboarded quad over the scene and I want the alpha value of each fragment of that quad to be multiplied by the alpha of the corresponding fragment in the color buffer.
Is this possible through the fixed function pipeline, or barring that, can a fragment program read from the color buffer ( specifically from the corresponding value in the color buffer )?
Thanks,
glBlendFunc(..... GL_DST_ALPHA .....);
I'll be damned. I've wondered what GL_DST_ALPHA actually referred to, now I know. Thanks,
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| OpenGL Alpha Channel Problem | Moganza | 1 | 1,430 |
Jan 19, 2013 08:25 AM Last Post: sealfin |
|
| passing values from vertex to fragment shader | Sumaleth | 6 | 8,658 |
Feb 18, 2011 01:54 AM Last Post: Holmes |
|
| Changing Pixel Values using CG | LIPH700 | 1 | 3,760 |
Nov 25, 2010 03:17 PM Last Post: SethWillits |
|
| GLSL fragment program limits on GMA950 (MacBook) | memon | 12 | 7,954 |
Oct 26, 2007 05:18 PM Last Post: arekkusu |
|
| Reading texture colors values | Leroy | 6 | 4,120 |
Jul 24, 2007 10:06 PM Last Post: Leroy |
|

