joseph.howell Posted September 8, 2016 Posted September 8, 2016 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?
silent Posted September 9, 2016 Posted September 9, 2016 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: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
joseph.howell Posted September 12, 2016 Author Posted September 12, 2016 Ok, that's what I figured. Thanks
Greg.Mildenhall Posted April 26, 2018 Posted April 26, 2018 Is this still true, or is the 2.6.1 pipeline more flexible?
Greg.Mildenhall Posted June 8, 2018 Posted June 8, 2018 Is this still true, or is the 2.6.1 pipeline more flexible?
silent Posted June 8, 2018 Posted June 8, 2018 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: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
Recommended Posts