Blend as function of stencil

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 = deststencil0.2 + source*(1-stencil*0.2)

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).]