Alias-Free Shadow Maps

Hey folks,

Has anyone tried implementing this shadow technique on
modern GPUs? It’s a paper from 2004 Eurographics and describes
a way to produce alias-free shadows (i.e. no stair-stepping
or moire artifacts) without using ray-tracing. The problem
I see (and described in the paper too) is that the irregular
data structure needed to implement this makes it impossible
(perhaps due to my lack of imagination) to implement it on
OpenGL + GLSL. Maybe a combination of OpenGL + CUDA does the

Paper and slides are here:

Here’s the outline of the technique:

In this paper we abandon the regular structure of shadow maps. Instead, we transform the visible pixels P(x, y, z) from screen space to the image plane of a light source P′ (x′ , y′ , z′ ). The (x′ , y′ ) are then used as sampling points when the geometry is rasterized into the shadow map. This eliminates the resolution issues that have plagued shadow maps for decades, e.g., jagged shadow boundaries. Incorrect self-shadowing is also greatly reduced, and semi-transparent shadow casters and receivers can be supported. A hierarchical software implementation is outlined."

Clearly, the shadow terms are needed only for the visible pixels of the screen-space image. We compute exactly that by transforming the visible pixels to the image plane of the light source, and do not discretize the projected coordinates. The projected points are then used as sampling points when the geometry is rasterized from the light source. This eliminates the concept of shadow map resolution. Resolution mismatch problems are completely eliminated, and incorrect self-shadowing is greatly reduced.

not the way he proposes that we do it as it requires that you use a non rectangular grid for rendering on, and that’s clearly not the way hardware works, and frankly i think you have to do some kind of raycasting here for it to work.
it would be possible though if we had and could render to a vectorgraphics texture, but sadly that is not possible.

There is a method that can do some of this, it’s called stencil volume shadows and is mostly aliasing free, it’s slower though and requires several passes.

Both of these methods give sharp edges and clearly that’s not always desirable, so you have to use PCF or something like it and that clearly makes aliasing a non issue.

There’s a spin-off of this back-projection trick mentioned in one of last year’s GDC presentations. It uses areas of approximated backprojected geometry for plausible soft shadows though. Perf’s not exactly on par with some of the other methods (VSM, CSM, ESM, …) at this point, but it’s very interesting.

This all reminds me of a paper talked about in last year’s SIGGRAPH (actually written 2 years ago) by Aaron Lefohn (now on the Intel Larrabee team, formerly Neoptica) and Shubhabrata Sengupta called Resolution-matched Shadow Maps. The paper mentions Aila’s alias-free shadow maps.

Similar focus of match the desired screen-space density, but used the GPU to generate the non-uniform shadow map samples at the desired rates. Really cool use of reprogramming the GPU to do something it wasn’t originally intended to do. The kind of thing that makes a Larrabee-type system very interesting (hopefully they’ll actually pull it off and ship it). Check out the videos if you can find them. PDF here. Excerpt: