Hi all,
let’s see what i want to do :
I want to apply a color mask texture on front buffer. This is not a pixel visibility mask, but a pixel’s component one…
For example, if my masking texture is a red one, all pixels which contain no red value on front buffer need to be discard :
current pixel on front buffer : (0,G,B)
current pixel on the masking texture : (R,0,0)
So (0,G,B) * (R,0,0) = (0,0,0)
For the moment, i do this using PBuffer and multiTexturing: i render the scene into the PBuffer, then apply the masking texture on it using multitexturing, which authorize multiplication of pixel components.
But now, i would like to achieve this WITHOUT PBuffering… the main idea is to render a full screen rectangle after the standard scene render process, and to let my Geforce4 multiply pixel components.
Have u got any idea to achieve that ? maybe using TexEnvMap (GL_MODULATE property) or Stencil buffer ?
Another thing, i don’t want to use pixel and vertex shaders…
Thank you for your help !