I want to use MRT to output my depth buffer in Ogre 1.9.1 (using 1.9.1 because I'm using Gazebo). I got the basics working by outputting depth in a PF_FLOAT32_R texture and disabling the getGLFormat exception as described here: viewtopic.php?p=518118#p518118
This works for a simple case. But then if I insert an intermediate compositor, the contents of the depth texture don't get through. My original pass renders both textures in a shader and my final compositor is:
I tried using 'chain_scope' on the texture line but that didn't help. And the docs say input can only have values of 'none' or 'previous,' but I really want my PF_FLOAT32_RGB texture to come from the 'previous' input and my PF_FLOAT32_R texture to come from the very first input. Any suggestions?
mogumbo wrote: ↑Tue Oct 19, 2021 12:12 am
I tried using 'chain_scope' on the texture line but that didn't help. And the docs say input can only have values of 'none' or 'previous,' but I really want my PF_FLOAT32_RGB texture to come from the 'previous' input and my PF_FLOAT32_R texture to come from the very first input. Any suggestions?
then you have to write PF_FLOAT32_R in the first input and reference it like:
I don't think I understand completely. I see two possible scenarios:
1. Initial render -> final compositor
2. Initial render -> intermediate compositor(s) -> final compositor
In Scenario 1, there's no other compositor that can define a texture with chain scope, so I don't know how to apply your solution to that. In Scenario 2, I could probably do it but I'd like to be able to insert intermediate compositors without modifying them. Is there any way to get the PF_FLOAT32_R render target from the initial render simply by asking for it in the final compositor? I guess changes to the initial render are okay since I have to make it write to an extra texture anyway. But I'd like to be able to use any intermediate compositor without modifying it.