Is there a way to find the LIGHT_COLOR at a specific UV location?

Godot Version

Godot 4.2


I am making an isometric game with 2D lighting. Because of my game’s perspective I would like for the entirety of my player sprites to be lit with the same color as they are lit at their base (at their feet). Is there a simple way to do this?

My initial guess was that I could use Shaders to a) get the LIGHT_COLOR of a sprite at it’s base and b) apply that to each pixel’s LIGHT_COLOR. The problem I am running into is that there seems to be no way to do this like there is for a sprite’s texture. Am I missing something? Or is there another way to accomplish this effect?

Wanted to replay to say that I found a solution that I think works, but I’m not sure is correct or has any side effects.

Essentially, I am modifying the VERTEX of the sprite in the fragment function to spoof the light function into sampling light from a different position. I tried using LIGHT_VERTEX instead, but that didn’t seem to do anything. Is this a decent solution to this problem? Thank you for any info you can give; working with shader code feels like working with a black box a lot of the time.