I just need to follow the rest of the math in the theory section as closely as I did the log

filtering to get the rest of it. ðŸ˜‰

You should buy ShaderX6 and read my article about ESM, you can find in it also your own interpretation of it ðŸ™‚

Even though it’s not true that whatever smooth-monotonic function will do. Note that in the ESM case there are 2 ways of approximating a step function, the one that you showed and another one that goes from -inf to 1. While the first one suffers from light bleeding on non planar receivers the second one suffers from over darkening. That’s the price one has to pay with approximations ðŸ˜‰

Even though it’s easy to replace the step function/occlusion test with another function that looks ‘good’, you are going to have all sort of different problems when geometry or lights move. Moreover a generic function doesn’t allow you to know (in the general case) what rules you should apply while filtering your shadows.

Blurring your map(s) like you can do with ESM or VSM is not magic, only works for specific reasons. For example I used exponentials because those are the only functions that can make light bleeding invariant under translations. It doesn’t sound like a big deal but you don’t really want your shadow to get significantly darker or lighter just because your objects are moving around some light ðŸ˜‰

VSMs replaces step functions with a 2D -> 1D mapping, perhaps you can experiment with some 3D textures as well ðŸ™‚

]]>http://developer.download.nvidia.com/presentations/2008/GDC/GDC08_SoftShadowMapping.pdf

]]>