Jump to content
Posted 01 June 2014 - 01:09 PM
Posted 01 June 2014 - 04:06 PM
yes, just set up a texture using the depth attachment point in your framebuffer and it will have the depth rendered to it, then you can pass that texture into your fragment shader along with your existing texture.
Mind you that you are probably already using a renderbuffer with the depth attachment point, and that can be removed entirely and replaced with the depth texture you create instead, just pay attention to documentation about the format of your texture to make sure its compatible.