title: Rendering to texture hides the front face,something's wrong with the z buffer?
body: <p>I want to render my scene to a texture and apply a blur shader to this texture .The problem is that when I draw back my texture the front faces of the cubes are invisible</p>
  
  <p>without supersampling</p>
  
  <p><img src="https://i.stack.imgur.com/Yg4cs.png" alt="enter image description here"></p>
  
  <p>with supersampling</p>
  
  <p><img src="https://i.stack.imgur.com/gzRrl.png" alt="enter image description here"></p>
  
  <p>*Ignore the opaque thing around the cube in both photos.I double render the cube once with less alpha and more scale ,I disabled this but I have the same problem.</p>
  
  <p>For some reason I am using the y as z and z as y,so the front face of the cube has less y than the back face(instead of z)  ,I am guessing something is wrong with the z-buffer.</p>
  
  <p>The render to texture code: </p>
  
  <pre><code>public class RenderOnTexture {
      private float m_fboScaler = 1f;
      private boolean m_fboEnabled = true;
      private FrameBuffer m_fbo = null;
      private TextureRegion m_fboRegion = null;
      public RenderOnTexture(float scale) {
          int width = (int) (Gdx.graphics.getWidth()*scale);
          int height = (int) (Gdx.graphics.getHeight()*scale);
          m_fbo = new FrameBuffer(Format.RGB565, (int)(width * m_fboScaler), (int)(height * m_fboScaler), false);
          m_fboRegion = new TextureRegion(m_fbo.getColorBufferTexture());
          m_fboRegion.flip(false,false);
      }
      public void begin(){
          if(m_fboEnabled)
          {                  
              m_fbo.begin();
              Gdx.gl.glClearColor(0, 0,0,0);
              Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
          }
      }
      public TextureRegion end(){
          if(m_fbo != null)
          {
              m_fbo.end();
              return m_fboRegion;
          }  
          return null;
      }
  }
  </code></pre>