The latest feature I implemented in LipsEngine is a method to reduce and almost completely remove aliasing caused by high frequency normal maps and limited pixel shader evaluation frequency. As you know the pixel shader works on rasterized fragments, which are about the same amount as the screen resolution. If you now imagine these "sample points" as a grid and how they would "move" over the shaded image you can clearly see how this will without a doubt lead to aliasing. This issue is further increased by evaluation of a wide range of pixel intensity values, which are very common in physically based shading. A high frequency normal map like the one seen below for example can create extreme cases of aliasing when evaluating your lighting 's BRDF with a very low roughness value: This has been pretty much the case with every game that came out since forever. Recently there have been some exceptions. To mention a few recent ones that successfully tackled this issue: Ryse (Crytek) and The Order 1886 (ReadyAtDawn). There are several ways to go about it. A nice article can be found here: http://blog.selfshadow.com/2011/07/22/specular-showdown/. Basically what all of these technique try to do is find a way to evaluate the BRDF with a higher frequency than your regular pixel shader does. You could for example go the brute force way and implement some kind of shader supersampling or texture space shading to obtain a "ground truth" result. However this is of course unfeasible to do in real time so we need to look for other ways... A more interesting approach is Toksvig AA (a technique presented by Michael Toksvig in 2004) or the one presented by the guys from ReadyAtDawn (which is also the one I've implemented in my engine), that try to find a new "corrected" roughness value by evaluating an "effective BRDF" which properly accounts for the variance of all normal map texels covered by a pixel. We can then compute this value from every mip level of the normal map and can then either store this new roughness value in a texture or compute it in real time during the material shading pass. I absolutely believe anti-aliasing is crucial to blending realtime rendering and CG. And now that there are efficient and fast methods to these issues, we should make sure to embrace them in future games. There's a quote by Stephen Hill that I like: ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Aliasing is one key differentiator between us real-time folk and the offline guys. Whilst they can afford to throw more samples at the problem, heavy supersampling would be too slow for us. MSAA is also ineffective as it only handles edge aliasing, so under-sampling artefacts within shading will remain - specular shimmering being a prime example. Post-process AA isn’t really helpful either since it does nothing to address sharp highlights popping in and out of existence as the camera or objects move. Finally, you might think that temporal AA could be a solution, but that’s really just a poor man’s supersampling across frames, with added reliance on temporal coherency. ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ And at last comparison shots and videos: http://screenshotcomparison.com/comparison/127238 Comments are closed.
|
Archives
May 2016
AuthorA guy who's passionate about graphics programming and has fun coding engine/tools Categories |