Quote Originally Posted by Junky View Post
Question: I have to delete the stencil test optimitzation, right?
Have you tried using a separate depth and a separate stencil attachment? In that case you only have to have the depth texture bound for texturing and for depth test (read-only) and the stencil texture bound for stencil test (read/write). This probably should work fine.