The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates.

godotengine.org | Twitter

+1 vote

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.

Godot version Godot4.0.beta14
in Engine by (63 points)

1 Answer

0 votes
Best answer

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!
https://twitter.com/joar_lj/status/1525445116789497856

https://twitter.com/TyoDevs/status/1619404315382226945
Hats off to Joar!

by (63 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.