Analytic Soft Shadows (Built-In/URP)

Analytic Soft Shadows is a real-time soft shadowing solution with shadows defined by Spheres, Capsules and Boxes

Forum ThreadWindows Demo • ✅Built-In (2018+) ✅URP (2020+)

It has bothered me for a long time how unrealistically sharp shadowmaps are, even with tricks like percentage closest filtering, they just don't get soft enough to feel realistic. I came across the Analytic Shadows technique and knew I had to implement it in Unity.

Features
• Performance: using tiled-culling and depth-aware-upsampling in best cases the performance is better than shadowmapping! (Best case: approximating high-poly models with few soft shadow shapes, worst case: approximating models with hundreds of small soft shadow shapes)
• Famous "Capsule Shadows" algorithm used in many AAA games
• Real-time adjustable shadow softness all the way from super hard to super soft
• An additional algorithm to choose from that provides soft shadows that don't fade with distance if that's what you want, similar to "signed distance field shadows"
• Easy to use shadow-caster components
• Blends with Unity's shadows nicely so you can mix and match them interchangeably
• Practically infinite shadow resolution, zoom in as close and as far away as you like
• Source code included for maximum flexibility

Limitations
• Built-in: Deferred rendering path only, URP: Forward rendering path only
• Mobile and WebGL are not officially supported
• Maximum of 1024 analytic shadows on screen at any given time
• URP: Version 10.0+ is required (Unity 2020+)
• URP: You will need to use the provided modified Lit shader on objects that you want to receive analytic shadows. Custom shaders will require modifications to receive analytic shadows.