Exponential Variance Shadow Map
Screenshots:


Docs to read:
- What is Variance Shadow Maps
- What is Exponential Shadow Maps
- A lot theory, comparison and about Exponential variance shadow maps here. You can also find some information and shader code at a presentation from Bungie: Lighting Research at Bungie.
- Integrating Realistic Soft Shadows Into Your Game Engine. PCSS - that's what we want to have but with less computation and better quality.
- NVIDIA's shadow mapping comparison: Advanced Soft Shadow Mapping Techniques
What we do is take filter size computation from PCSS + EVSM filter + possibility change it by building MIP level.
Algorithm:
- Render a scene at a regular Shadow Map with a MultiSampling.
- Build first mip level for EVSM by take an avarage value of all samples. Convert depth value to EVSM value.
- Blur first Shadow Map mip level into the second one.
- Calculate filter size based on a current depth and several samples from the regular Shadow Map around it.
- Based on this filter size sample EVSM texture between the first and the second mip level.
Disadvantages:
- The main is memory. You need four component float texture. And you need shadow map with multisampling also. It requires alot of memory.
- Aliasing from a far distance or acute view angle. We use SampleLevel and a standart texture filtration doesn't work. I think you can implement it by using ddx and ddy. If you know how to do it let me know.






