PDA

View Full Version : HDR + AA - As a Post Process perhaps ?


undercover
04-19-06, 05:52 PM
Hi All,

I'm chewing around the idea of adding some sort of AA to Oblivion HDR as a post-process. I have a proof-of-concept working on NV hardware under OpenGL and it could just work :)

The idea is to apply a blur filter kernal during the HDR tone mapping pass (almost the last pass done before the Present). That would of course look crap, BUT it only gets applied where a fragment falls on an depth discontinuity, i.e where there's an 'edge' in the depth buffer. You get sharp, untouched texture everwhere except at the silhouettes of objects, which get AA'd. It's not going to be a stunning solution but could be interesting :)

Now, in OpenGL when sampling a depth/stencil texture you can disable PCF. It turns out that under DirectX you can't, so using a depth/stencil buffer as a texture wont work. The edge (Canny) filter requires actual depth values, not a shadowmap PCF.

So, my second idea was to use MRTs and create/attach a second FP target and modify all the appropriate shaders to pass a fragment depth from the VS to PS and out into the 2nd colour output (oC1). This looks like a huge job just to work out the shaders that need modifying, certainly more than I can tackle. :surrender

Would anyone like to have a stab at flexing their mad dx skillz, comment in the idea or perhaps just blow the whole thing out of the water ? :)

Rob J

Pegasus*
04-23-06, 06:18 AM
i dont think many ppl understood that:thumbdwn: lol

Review
04-23-06, 02:04 PM
Wouldn't the overhead required for this completely kill performance?