OpenGL Stencil buffer artifacts...

Discussion created by xernobyl on Jan 24, 2012
Latest reply on Jan 28, 2012 by swoop

I have the following artifacts when doing a second pass (cutting lights in a deferred  thing), using a stencil test on a GL_DEPTH_STENCIL target to cut a few pixels:


http://web.ist.utl.pt/tcf/rand/stencilcrap.png (2x crop)


I can't figure out what''s wrong, since another pass that also uses the stencil buffer seems to be working ok (or maybe the artifacts aren't so easy to see because it's a darker pass). Also, when I deactivate all the stencil test everything works fine (slower, and everywhere, but withour artifacts).


Neede a little guidance on this, please