Is it possible to access SDFs within compute shaders

Godot Version



Howdy! I’m simulating a bunch of simple 2D particles using a compute shader, and so far things have been going well. However, I’m hoping to implement simple collisions with the environment.

My assumption about the best way to do this is that I ought to tap into the SDF already being generated from LightOccluders in my scene. However, I’m starting to realize that accessing that data from within a compute shader is not as easy as accessing it in a normal shader.

Is this possible at all? Is this approach the best one to take?

Thank you very much for your help!

P. S. I’m new to shaders, godot, and the forum, so if I’ve made a novice mistake or oversight, I’d very much appreciate it if you let me know politely <3