PDA

View Full Version : Blend as function of stencil



ToolTech
09-09-2002, 12:13 PM
Is there any way to render a quad over the entire screen and let the blending of quad color and destination color be a function of the stencil values.

Like dest = dest*stencil*0.2 + source*(1-stencil*0.2)

Nakoruru
09-09-2002, 12:26 PM
No, not directly.

One way to get what you want would be to copy stencil to an alpha texture and then use it to blend (SRC_ALPHA, ONE_MINUS_SRC_ALPHA) a quad that is the color 0.2. That is possible in OpenGL 1.0


[This message has been edited by Nakoruru (edited 09-09-2002).]