2D Dynamic Drop/Offset Shadows

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By tyo

So I’m trying to make something similar to the offset shadow shader in the 2d shaders demo, but I’d like to make it more reactive. Right now it’s reliant on an input angle, but I’d like it to instead rotate appropriately whenever the light changes. but, all the light positional/directional data is all in the light processor. As I understand the light processor it’d be useless to try to do this in there.
how it looks now
Anyone have any ideas how I could achieve this? I’ve considered using proper occluders but I couldn’t quite figure out how to use the SDF functions to their fullest, maybe there’s something there but as far as I could tell I’d hit the same problem. In Godot 4.0 if that helps.

:bust_in_silhouette: Reply From: tyo

So I found an excellent thread by Rain World developer Joar Jakobsson detailing how they did exactly this for Rainworld! I managed to implement it as well!

Hats off to Joar!