Rect Light Shadows


I was having fun with the rect lights and I noticed that the shadows are still based off of a point light. The angle of a shadow when an object is at a far end kind of ruins the effect IMO

I was thinking it would be better if we had another parameter that let us set the location of the point source relative to the rect light base location. Then we could move it back and get more accurate shadows. If we could have an infinity setting then we could even get pure orthogonal shadows

I don’t know if it’s possible, but it seems like it should be. For a point light alone, this would be completely stupid, but since the point light location and the attenuation radius can be separate, it seems like the location of the point source could be arbitrary. The shader shouldn’t really care what those values are – unless they are hard-coded for some reason.

I guess someone who knows the shaders would be able to answer this. I just had the thought and wanted to share.


Infinite small rect light is just point light that only shines to other direction. Or fully open 90degree spotlight. So moving that shadow caster like that would cause other issues like unwanted shadows on the sides.
One simple improvement would be to allow to use PCF soft shadows also for rect light.