PDA

View Full Version : Stencil Buffer and Texture



04-03-2002, 01:16 PM
Hello,

I have a texture with (let say to be simple)only a black plain circle in the middle. (But in fact it could be a much more complex 2d form) And the rest is white..
How can I use this texture to be a mask with a stencil buffer.
Or how with this texture I will be able to display objects (for expl in wireframe mode) only in this black shape (here the plain circle) and the rest of the window will still have filled objects drawn ?

Does everybody understand my pb or should I reformulate it ?

Thanks for your helps

Paul

Semi-Automatic-Munky
04-04-2002, 02:02 AM
You can do this by using an alpha channel in your texture, and using alpha test to reject one of either the circle or its surrondings, the non rejcted fragments from the alpha test will then be able to mofiy the stencil buffer.