Soft Shadowing can be done in a number of different ways depending on the intended appearance of the rendered shadow.
By default, a surface is in shadow when the light source is occluded by another surface in the direction of the ray of the light source.
In this case, Surface A occludes the edge of Surface B, and causes a shadow where the light is blocked. The Surface is either lit, or in shadow and no blending is considered.
On the left, the shadow can be seen on Surface B. On the right, a side-view representation demonstrates that the shadow occurs when the single ray from the light source is blocked by Surface A.
The Soft Shadow Sample Size property defines a light range in Z that is used to interpolate the amount of shadow on a given surface. This creates a soft shadow that blends along the direction of the light and fades to a lighter shadow as it recedes from the occlusion source.
On the left, a softer shadow can be seen on Surface B. On the right, a side-view representation demonstrates that the shadow creates a penumbra when only a portion of the light is occluded. The Soft Shadow Sample Size defines the height-range of the light source—the penumbra is created by interpolating how much of the light source is occluded between the upper and lower range of the light.
Sometimes, multiple options can be used to help better represent shadows on softer surfaces.
On the left, a basic shadow with Shadow Sample Size of 0 causes a hard shaded surface. In the centre, the shadow’s aliasing bias and blend is set to help blend out the shadow details closer to the occlusion source at the starting edge of the shadow. On the right, the Shadows Sample Size is set to a larger number to create a softer shadow that blends as it recedes away from the light source.
If a more diffused shadow is preferred, the shadow can be created with multiple samples that are offset. This is helpful when creating lighting conditions that are less direct or for creating shadows that blend softer around the contours of the surfaces.
On the left, a hard edged shadow with no sampling. In the centre, the shadow is calculated by sampling only a handful of times, creating a shadow that appears to be created from multiple light sources. On the right, the shadow is calculated with many samples, creating a blended surface that appears more rounded and softer over the entire surface.