пʼятницю, 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 :)

2 коментарі:

xop сказав...

Very interesting topic :) I'm playing with an idea of emulated 4xMSAA (prepare oversized G-buffer, then render to screen sized image buffer, with light equation executing only once for groups of samples with similar depths, and maybe normals). It seems to be faster than straightforward singlepass SSAA, but I wonder how that would compare to multipass SSAA.

As for HW MSAA.. DX10 custom resolve?tre

oles.shishkovtsov сказав...

BTW, your idea is applicable to DX10 super-sampled lighting of MSAA-ed G-buffer.
Read my next post :)