Shadow map filtering (PCF, POISSON, PCSS)

Percentage-Closer Soft Shadows and other shadow map filters test.

But I can’t make PCSS look the same as they look in nvidia sample, so any suggestions and corrections are welcome.

To make things a bit different from jhonny.goransson’s shadow maps example I use view-space z value for shadow map and deferred shading (to keep shading in a separate pass).

Also, used orbit camera from this repository

15 Likes

Just added a branch with perspective light projection.
Probably PCSS looks better for non-linear depth (I couldn’t make it work with perspective light projection and view-space fragment position reconstruction, so in this branch I moved to gl_FragCoord.z)

1 Like

Variance Shadow Map.

But gauss filter adds some artefacts, so it’s disabled (lack of precision?)

7 Likes

Well done! So glad to see my (crappy) example is useful :slight_smile:

2 Likes