Area Lights causing strange hard shadow through objects

I’m having an issue where my area light is creating this hard shadow on these columns. The shadow seems to correlate with the angle of the area light. I don’t think it is a problem with the column because it also happens with a default cube object. If I switch to a point light the shadow issue seems go away. Could someone help me solve this issue?

Using an area light

Using a point light

Using an area light with a default cube

Hi, this is happening because realtime or mixed area lights use a shadowmap projection which is essentially the same as spotlights. The shadowcasting geometry is right at the edge (penumbra) of the light’s influence, and will likely always receive a distorted portion of the shadowmap, which can result in unexpected results due to stretching of the map at these extreme angles not playing nicely with precision and biasing. Your nearplane is also very close to the light’s position, increasing that will get you some extra precision and better quality shadows generally.

Point lights do not suffer in the same way, because they actually use a 6-sided array of shadowmaps, to cover the cardinal axes of the light. Therefore, the geometry perpendicular to the light is receiving a shadowmap which is straight-on from the perspective of the source, which will yield nice crisp shadows. Incidentally, you should really try to avoid using realtime points for this reason as you’re effectively running 6 vertex shaders to render depth, for every point light, for every frame using this update method.

You could tweak the biasing to get slightly nicer results, but as the geometry it right at the edges of the room and unlikely to interact with characters, I’d maybe just use a baked light to light this part of the room and save my realtime shadow-casters for some spotlights with a much narrower cone. A diffuse area light like this would not actually cast a hard shadow to adjescent geometry anyhow. These lights naturally create very soft indirect shadows that would look more similar to AO or “blob” shadowing, so the hard shadows you are trying to create here are not appropriate.

1 Like

Thanks for the very detailed answer! I will see how I can tweak the lighting based on your suggestions.