Jump to content

[SOLVED] Depth buffer when using renderImage2D


photo

Recommended Posts

Posted

Hi, I want to render to a texture using Render::get()->renderImage2D() and get the depth buffer from that render.  Is that possible to do, or would I just need to write a shader that outputs the depth?

Posted

Hi Joseph,

 

I'm afraid the only way currently is to write custom post process shader (from shaders you can get access to the raw GBuffers, including depth buffer) and save depth buffer content to some texture.

How to submit a good bug report
---
FTP server for test scenes and user uploads:

  • 1 year later...
Posted

Is this still true, or is the 2.6.1 pipeline more flexible?

  • 1 month later...
Posted

Is this still true, or is the 2.6.1 pipeline more flexible?

Posted

Hi Greg,

Since the 2.5 you can get access to the Gbuffer textures and depth via callbacks via C++ API (not only via shader's code) - that's the main changes.

For displaying depth texture (we also use inverse-Z to increase depth accuracy) you will probably need some additional processing (or shader) to do so.

Thanks!

How to submit a good bug report
---
FTP server for test scenes and user uploads:

×
×
  • Create New...