Godot Version
4.6
Question
Is it possible to write to the depth-texture using compositor effects? When i get the depth-texture from the scene_buffers i cant write to it because its missing the write-bit.
Is there a way to work around this?
Why do you need to write to it?
Because im writing my own renderer and want it to be compatible with godot native ssao/ssr for example
I still don’t see why would you need to write to a depth texture, unless you’re implementing your own depth buffer and plan to use compute shaders instead of regular shaders. In any case you can always write modified depth data into a custom texture and use that any way you need.
???
I literally just said im writing my own renderer and using compositor effects and therefor compute shaders and YES i obviously calculate my own depth, why else would i ask this question??
When i write to a custom texture godot wont use the information??
Are you even reading my messages?
Use it for what?
What’s the exact pipeline you’re trying to make. Be more specific.
You want to pass custom/altered depth to Godot’s post-processing? Afaik that’s currently not possible via the compositor. You’ll have to either write the final depth from the rasterizing shaders, or implement your own post-processing that uses your own depth buffer, or make a source code intervention.