Original Post
Hi, I'm trying to draw some quads on the screen but I want to discard the first n quads that are closer to the camera on a per pixel basis. I'm drawing all from front to back and trying to ignore the first n by using stencil adds until the reference value is reached but I think I don't get at all how the stencil buffer works. Help me please.