seen
11-13-2006, 03:42 PM
New to shaders. Recently ordered the Orange Book.
Hoping someone can answer a question related to blending of images. For a variety of reasons I want to perform my own blending operations during certain stages of rendering. At one point in my drawing routine I need to not blend incoming textures against the frame buffer, only with each other. It's hard to explain but I'll try.
Here's some pseudo code:
clear framebuffer buffer with black
for(i < numtextures)
{
drawtexture(i) //do NOT blend against black background
}The kicker is I only want to blend the textures with one another, not against the background. I'm fine with simply overwriting the framebuffer contents with the texture, but I need the textures to blend with one another.
I probably don't even need to use a shader to do this, but I'm drawing a blank on how to do this procedurally.
Hoping someone can answer a question related to blending of images. For a variety of reasons I want to perform my own blending operations during certain stages of rendering. At one point in my drawing routine I need to not blend incoming textures against the frame buffer, only with each other. It's hard to explain but I'll try.
Here's some pseudo code:
clear framebuffer buffer with black
for(i < numtextures)
{
drawtexture(i) //do NOT blend against black background
}The kicker is I only want to blend the textures with one another, not against the background. I'm fine with simply overwriting the framebuffer contents with the texture, but I need the textures to blend with one another.
I probably don't even need to use a shader to do this, but I'm drawing a blank on how to do this procedurally.