Moment Shadow Mapping
2019-10-08
Moment Shadow Mapping(MSM)
Blur shadow depth buffer and get a smooth shadow. Use computer shader to do the blur process.
![](/Blog/images/moment_shadow_mapping/origin.png)
![](/Blog/images/moment_shadow_mapping/moment shadow mapping.png)
![](/Blog/images/moment_shadow_mapping/PCF.png)
![](/Blog/images/moment_shadow_mapping/shadow_depth.png)
Computer Shader result:
![](/Blog/images/moment_shadow_mapping/1.png)
![](/Blog/images/moment_shadow_mapping/2.png)
Compare PCF, MSM:
PCF also can get a smooth shadow, but without a nice transition from dark to bright.
MSM will cost more time on my computer. (PCF with 120 fps, MSM with 90 fps)