GOW III: Shadows

Posted: March 11th, 2010 | Tags: , | 2 Comments »

I checked out this session at GDC today - I'll try and sum up the main takeaways (at least for me):

  • Artist controlled cascaded shadow maps, each cascade is accumulated into a 'white buffer' (new term coined?) in deferred style passes using standard PCF filtering
  • Shadow accumulation pass re-projects world space position from an FP32 depth buffer (separate from the main depth buffer). The motivation for the separate depth buffer is performance so I assume they store linear depth which means they can reconstruct the world position using just a single multiply-add (saving a reciprocal).
  • They have the ability to tile individual cascades to achieve arbitrary levels of sampling within a fixed size memory (render cascade tile, apply into white buffer, repeat)
  • Often up to 9 mega-texel resolution used for in game scenes
  • White buffer is blended to using MIN blend mode to avoid double darkening (old school)
  • Invisible 'caster only' geometry to make baked shadows match on dynamic objects
  • Stencil bits used to mask off baked geometry, fore-ground, back-ground characters

The most interesting part (in my opinion) was the optimisation work, Ben creates a light direction aligned 8x8x4 grid that he renders extruded bounding spheres into (on the SPUs). Each cell records whether or not it is in shadow and the rough bounds of that shadow. To take advantage of this information the accumulation pass (where the expensive filtering is done) breaks the screen up into tiles, checks the tile against the volume and adjusts it's depth and 2D bounds accordingly, potentially rejecting entire tiles.

Looking forward to the the rest of the talks, this is my first year at GDC and it's pretty great :)


2 Comments on “GOW III: Shadows”

  1. 1 bdiamand said at 1:30 am on March 17th, 2010:

    Glad you liked the talk! :) I think you pretty much have it all. I wish I would have had the time to cover drop shadows and SPU optimizations but 60 minutes goes by surprisingly quickly...

  2. 2 mmack said at 8:58 pm on March 17th, 2010:

    Yeah I thought you got through a lot in the time. I guess for me I would have liked more on the advanced bits but you gave a good background to the problem (of shadowing), especially the nice visualizations of texel density.

    Will have to look out for the drop shadows in game when my copy arrives!

Leave a Reply