Godot Version
4.2.1
Question
I have a 3D shader effect that I’d like to do in two passes. In the first pass I’d draw the back faces of my mesh to a depth buffer to get a hollowed out image of my shape. In the second pass, I’d draw front faces, but also test against the depth buffer I created in the first pass. I’d also want this second pass to actually be composited into the final viewport image. At the moment I can kind of do this by having the first pass just draw into the scene’s depth buffer with back faces, but that is causing issues with other objects that are drawn behind it. I want this backface depth buffer to only be used with the second pass of objects using my custom shader.
Is there a way to do this with Godot’s render pipline?