пʼятницю, 18 січня 2008 р.

Deferred anti-aliasing (AA)

OK, I'm going to post a series of really small articles/comments on the difficulties usually referred as deferred shading problems. But don't expect me to post very often :)

The most difficult thing is anti-aliasing. First of all, I'd like to mention that I don't really like MSAA :) I am a big fan of supersampling. That's because in CG we have a lot of aliasing we can't really control, like specular "reflections" on the bumpy surface...heck! Even some diffuse maps can alias pretty bad under certain conditions! Unfortunately that's still too slow for most hardware/engines/content/etc...

So, the summary of methods I've implemented in the past in the 4A-Engine (the "Metro 2033" deferred renderer):
  1. HW MSAA (Yeah! I know everybody will say this is not possible :))
  2. 2D supersampling (both oversized RTs and multi-pass thing where you can control sampling locations)
  3. Temporal supersampling (via temporal re-projection and caching)
  4. Edge-detection and weighting/blurring (not really AA, but can produce results similar to MSAA with somewhat "heavy" shader)
  5. DX10-style mixed multi-sampling for G-Buffers and supersampling/undersampling of lighting
  6. (not implemented) I am still waiting for the DX11 multi-frequency shading to expand the list of techniques :)
I'll go into detail in the next posts :)