Godot Version
4.5 mono
Question
I wanted to write a compositor effect to compare two depth textures to see if a specific object is visible and not culled. I was going about this by using two subviewports, one which renders the scene and another which renders only one specific object.
To my main scene viewport, I added a shader to do the aforementioned depth comparison, but I had to get the depth texture from the other subviewport, so I used another compositor effect which just outputs the depth buffer. However, after looking at the result, it appears that they were in two different colorspaces, and the comparison wasn’t possible.
I’ve been banging my head at this for a while, and I feel there must be a better way to do this that I just don’t know, since I’m not too familiar with the compositor.