Godot Version
4.3
Question
Is there a way to reflect a Light2D (either a PointLight2D or a DirectionalLight2D)? As far as I can tell, there’s only the option to occlude it, but not reflect it. I’ve been trying to think of ways to mimic reflecting: dynamically adding another Light2D at the point of reflection, using RayCast2Ds with a Line2D laid on top, but nothing I’ve tried or read online works in a reasonable way.
Any ideas here would be swell.
In case anyone finds this and has the same question. I was able to do it, but it basically involved re-writing all of Godot’s lighting from scratch. I don’t recommend it unless you really, really need it.
Another update! I wrote this in gdscript and when I scaled up the number of lights, occluders, and reflective surfaces the framerate dropped to 4-10 fps. I tried doing some optimizing, but I think I got about as much out of the gdscript implementation as I could. I’m now trying to reimplement it in C#.
I see a lot of differing reports about the comparative performance since they both call C implementations of functions, under the hood, but hopefully it’ll give me something.