0 Replies Latest reply on Feb 22, 2013 3:08 AM by MaxDidIt

    Can I Keep Stage3D From Writing Into the Z-Buffer?

    MaxDidIt

      I want to render concealed objects and achieve a similar effect as the one shown in the link in Stage3D.

       

      Silhouette Effect in Torchlight 2

       

      I already know how to do this theoretically. I have to draw the object twice:

      • Once with normal settings and
      • once with a different depth sorting mode where only pixels that are behind rendered geometry are shown. Also, to prevent weird effects later on, these pixels can't be rendered into the depth buffer.

       

      I can set the correct depth sorting mode in Stage3D with Context3DCompareMode.GREATER. Is it also possible to have Stage3D render pixels into the back buffer, but not the z buffer?  If I can't keep Stage3D from rendering to the depth buffer, the effect will look like this:

       

      Glitchy Silhoutte Effect