Cascaded shadow map technique is the idea that rendering objects with different quality of shadow based on their distance to camera. The closer and object is to camera, the higher detailed shadow is used.
A common way to split shadow map into different detailed ones is based on distance from camera point. In my case, I’m dividing the camera’s frustum into three levels.
(Visualize frustum dividing)
Then, a bounding sphere will be calculated for each sub-frustum, marking shadow area for each level.
(Large spheres represent render area in different levels)
The sphere represents the smallest volume needed to be rendered to receive shadow in this shadow level. The light orthogonal projection will be set up encapsulating the sphere. Anything lying outside the projection volume can be ignored since they won’t be seen casing shadow in this level. A frustum culling can be done at this step to increase program performance.
For the final rendering, I find the smallest shadow frustum that a pixel is completely inside during pixel shading and sample shadow from corresponding shadow depth map. This gives me a similar result as the Cascaded Shadow Maps sample in DirectX SDK.
(Colors represent different level of cascaded shadow map)
(Cascaded shadow maps, notice the split line of two levels in the upper middle of image)
Comparing to my previous simple shadow map, a cascaded shadow map can provide me with great shadow details at close distance without sacrificing a large render area.
Cascaded Shadow Maps : https://msdn.microsoft.com/en-us/library/windows/desktop/ee416307(v=vs.85).aspx