this is basically meant to emulate sprite 3d objects having different sides- also the sky is misleading the only source of light is at 0,0,0
basically it takes the direction towards the player and the light and finds the difference between them, then takes a percentage from that and uses it to change the brightness based on how far off you are directionally from the light
as i said it's meant to try and simulate seeing a different side that is not exposed to light, which would obviously darken the sprite, unfortunately there are no gradients i can use, and also it's sprite 3d, so it may look weird, but it's functional
i hope this is useful at all
2 comments