What
When you have spotlight with angle bigger than what it is pointing at, you can reduce the shadow camera fov to make the shadow more detailed:
Here’s a picture (yellow cone represents light angle, gray cone represents shadow angle (fov), and the shadow of the person is gray):
The smaller shadow fov results in using more of the shadow map for the shadow, so the shadow will be less pixelated (i.e. the shadow will be finer in detail).
If there’s nothing else that needs a shadow within the spotlight angle, leaving the shadow at full size of the light angle is potentially wasting the shadow map (much of the shadow map will be unused).
Why?
If you have a scene with a point light and a single subject, and you want shadow on the object, and the camera is looking at a similar angle as the light towards the subject, a point light will be very wasteful: the point light will render the scene with 6 different direction shadow cameras (basically a cube map, 6 shadow maps) to calculate shadows in all directions.
With a spot light, we can reduce this to a single render of the scene (a single shadow map) to achieve the same effect (not only at a reduced cost, but with better quality).
Point light shadow radius 0, map size 512:
Point light with shadow radius 3, map size 512
Spot light with shadow radius 0, map size 512 (not only looking better, but notably faster than point light):
Spot light with shadow radius 3, map size 512 (not only looking better, but notably faster than point light):
With a spot light for this scenario, we can even turn up the map size and still be faster than point light:
Spot light with shadow radius 0, map size 2048 (not only looking better, but still notably faster than point light):
I wanted the softer look with the 512 shadow map size, so win win.
Note, for some reason spotlight.shadow.radius
seems to have no effect with spot lights, only point lights, however reducing the spot light map size happened to give the blurred effect I was after. This seems like a bug.
That is true. That’s why in the OP I tried to override the logic to force the fov
to be applied with my own values instead of it being derived from angle
.