Monday, November 12, 2007

Variance shadow mapping & Bullet physics

I've implemented variance shadow mapping, a simple modification to the standard algorithm that allows shadow maps to be filtered. I use bilinear filtering (mip maps are too slow), 8x anisotropic filtering and apply a gaussian blur and still get ~80fps with two light sources. I had to add a little hack to the lighting shader to get rid of artifacts, though.

The other two screenshots show simple bilinear filtered VSM and VSM with a gaussian blur applied and parallax mapping enabled:





I've dropped ODE and implemented Bullet instead. It's faster, more stable and its C++ interface integrates nicely with my code. I've also added decals using code from Eric Lengyel's article in GPG2, but I still have to find a way to blend them onto world geometry. The same is true for billboards. I might abandon deferred shading and switch back to multi-pass if I can't find a decent solution.

So what's left to do?
Omnidirectional shadow mapping - cube maps were to slow with the standard algorithm, they might work with VSM, but I can't use cube maps with deferred shading; I got it working with an unwrapped cube map, though. Still have to decide what's best.
Particle systems - should be possible to use Bullet for that.
Arbitrary reflections - and a way to render reflective surfaces with deferred shading.
Sky dome/box - should be easy :)

No comments:

Post a Comment