What you think of my Depth Pass AA?

Started by
7 comments, last by Paul C Skertich 9 years, 7 months ago

I'm wanting to implemend Nvidia's FXAA and TXAA inside my game - however, I figure I create my own AA. Perhaps, someone already has already came up with the type of AA and there's more work to do to enhance the blurring. I want your feedback and let me know what you think. It's rough demonstration not perfect quite yet.

The firest picture is when it's just using the 8x MSAA on high setting possible. The second image is the 8x MSAA and my Depth Pass AA implematation.

I'm still working on how to make it better. Was just fascinated on the descripton in Nvidia's website how FXAA works - this is when I started to think about trying out my own. I have a simple blur but I am thinking about making it box blur with two passes or possibly gaussian blur.

Game Engine's WIP Videos - http://www.youtube.com/sicgames88
SIC Games @ GitHub - https://github.com/SICGames?tab=repositories
Simple D2D1 Font Wrapper for D3D11 - https://github.com/SICGames/D2DFontX
Advertisement

I can't really give you feedback unless you give us some information about what you're doing.

The second image has a cell shader to detect the edges from the depth buffer. There's already a created blur texture of the entire scene in the Deferred Shader. So, with the edges detected and the blur - I linear interlope them using lerp having the edges used as an alpha between the normal scene and blurred scene. Same way that the Depth of Field works but with edge detection to help smooth out jagged lines.

- Render normal scene.

- Create blurred texture of normal scene.

- Grab depth buffer and find edges.

- Lerp(NormalScene, BlurredScene, EdgesValue.r);

I'm reworking some of ideas out. Normally the Edge Detection renders the lines black - I had to invert the lines to white to work with the lerp.

Game Engine's WIP Videos - http://www.youtube.com/sicgames88
SIC Games @ GitHub - https://github.com/SICGames?tab=repositories
Simple D2D1 Font Wrapper for D3D11 - https://github.com/SICGames/D2DFontX

I use a similar approach, including the normals, to generate outlines. The outlines use a blurred version of the image. Thought, this approach smooth geometry edges, it only covers some aliasing effects. FFXA does a much better job, because it is only based on color differences and uses certain pattern detections, thought a combination of both could result in a higher quality.

I believe I saw your post! There's some artifacts that pop in mine and hence it's using the depth buffer; the furthest vertex gets blurred. Graphicallly; it's not pretty. So, I'll probably rethink a plan or go with FXAA and if there's resources out there that cover TXAA (Temporal AA) then I'm all for it. I read about how Crysis or Battlefield 3 used Temporal Reprojection - not sure if this can be done like how I want the edges to be smoothed out. I can't find zip about TXAA anywhere.

So, when the camera moves around in the scene with this depth pass AA there's some hiccups - not the greatest appealing graphics but - perhaps a bit more tweaking. I'll keep posting

Game Engine's WIP Videos - http://www.youtube.com/sicgames88
SIC Games @ GitHub - https://github.com/SICGames?tab=repositories
Simple D2D1 Font Wrapper for D3D11 - https://github.com/SICGames/D2DFontX


The second image is the 8x MSAA and my Depth Pass AA implematation.

What is the point of using 8xMSAA + custom AA ?

Algorithms like FXAA exists because MSAA has quite an impact on performance/memory.

how does it look with 1xMSAA + your custom pass ?

It looks good but we need a whole lot more info in order to make a decent judgement.

- performance / memory usage

- compaire against other existing techniques (FXAA etc)

- how does it compaires to 'true' AA (supersampling)


I can't find zip about TXAA anywhere.

txaa looks to be a combination of 2xMSAA and temporal reprojection

Some of the FXAA versions are freely downloadable, so implement them as well and do some head-to-head comparisons.

Your screenshot looks good, but it's a very simple case. You'll have to test on a bunch of other scenes to see how well it compares.

Unfortunately nVidia has decided to sell TXAA as middleware, so you need to sign an NDA to get any info on it at all.

Epic have spoken about their temporal-AA solution here: https://de45xmedrsdbp.cloudfront.net/Resources/files/TemporalAA_small-59732822.pdf

What you're doing is a rather crude method of antialiasing. Such approaches were used maybe 5 to 7 years ago, before FXAA and MLAA were introduced. I believe the original Crysis used it when MSAA was disabled. While it's true that filtering is an essential component of antialiasing, just doing a simple blur along edges will remove details and will be susceptible to temporal flickering/crawling. This is because you really need sub-pixel information to do a decent job of antialiasing. MSAA naturally gives you sub-pixel information because it causes the rasterizer to run at a higher resolution. FXAA and MLAA try to get around this by analyzing neighboring pixel colors, and reconstructing analytical triangle data based on the edges it finds in the pixels. Temporal solutions use previous frame results as a means of increasing the effect sample count.

TXAA isn't anything like you've described. Unfortunately they don't share any specifics, but from what I've read from their press material and previous (deleted) blog posts it's essentially MSAA with a custom resolve combined with temporal supersampling. Custom resolves let you implement custom filter kernels, which can be used to boost quality over "standard" box filters used in hardware MSAA resolves.

If you're interested in temporal supersampling, here are some presentations that you can check out:

http://advances.realtimerendering.com/s2014/epic/TemporalAA.pptx

http://advances.realtimerendering.com/s2014/drobot/hraa.pptx

http://advances.realtimerendering.com/s2013/Sousa_Graphics_Gems_CryENGINE3.pptx

http://advances.realtimerendering.com/s2012/CCP/Malan-Dust_514_GI_reflections(Siggraph2012).pptx

http://iryoku.com/aacourse/downloads/13-Anti-Aliasing-Methods-in-CryENGINE-3.pptx

Thanks I'm researching and reading on those links.

Game Engine's WIP Videos - http://www.youtube.com/sicgames88
SIC Games @ GitHub - https://github.com/SICGames?tab=repositories
Simple D2D1 Font Wrapper for D3D11 - https://github.com/SICGames/D2DFontX

This topic is closed to new replies.

Advertisement