NFS Shift 2 Renderer Explained

Friday 15th April 2011, 03:14:00 PM, written by Alex G

Over at the NoGripRacing Forums Martin Griffiths, PC Lead for SHIFT 2 Unleashed at Slightly Mad Studios, goes on to explain and clarify some of the renderer details for the recently released car racer:

"SHIFT 2 has a completely new engine which is a deferred, light pre-pass renderer."

...

"With deferred rendering the lighting stage is separate from the geometry stage(s) and hardware anti-aliasing like MSAA in a basic form won't produce correct results. Solutions to allow us to anti-alias had to be found - we came up with two methods to balance AA processing cost/quality over a wide range of PCs."

...

"There are lots of 'tips' about overriding the AA mode - doing this will produce problems with lighting at edges and will also break other lighting components like Bloom, giving a visual look that we didn't intend."

...

"There has been some confusion that our anti-aliasing uses the CPU - it does not. In the graphics options the 'Normal' mode uses MSAA with a special sampling trick to produce correct results at triangle edges - the 'HIGH' method extends this with a depth based search which requires a GPU with high bandwidth because the shaders are sampling many depth pixels for each pixel in the scene."


The confusion regarding MLAA is likely from an earlier post on the GTP Forums by Ian Bell who briefly mentioned the situation with AA for Shift 2:

"We used morphological antialiasing on the PC and consoles. The PC settings for medium is edge detect and for high also reads depth information. On PS3 we run post processed MLAA totally on SPU."

Indeed, analysis of the Xbox 360 version of Shift 2 conducted with friends at Digital Foundry indicated a rather bugged implementation of MSAA (not MLAA), often causing artefacts at polygon edges. From what I can tell, the artefacting is most remniscient of the swizzle that occurs in eDRAM from using a 4xMSAA render target. The Gamefest 2010 presentation, "Still in the Trenches" actually shows an example image of the sorts of problems related to not dealing with the swizzle.

Curiously, the previous game shows no sign of the artefact, though the shift to a deferred setup for Shift 2 is the most likely reason for it being a problem now.  Whether or not they can fix the problem on Xbox 360 is up in the air (or if they are even aware of it).  It's actually strange that it passed quality & assurance considering how obvious it can be to the naked eye (but I might be a little biased with the image analysis *ahem*).

That said, the PS3 version is definitely using a form of MLAA on the SPUs, which is the probable impetus for working on a PC implementation. Martin Griffith elaborates:

"To better balance very high-end CPUs the patch will include a 3rd anti-aliasing method which is CPU based - MLAA. We are working with Intel R&D to add this. On quad-core (and above) systems this will allow AA without any GPU cost and little impact to the frame rate to what you see when running with AA turned off currently. This will also help AMD based quad-core too."

How it compares to AMD's GPU implementation for Radeon HD 5/6 series will be interesting.

SLI/Crossfire users should be happy with the upcoming patch as Martin explains:

"We've been in regularly contact with NVidia and ATI throughout the development of the game, with their performance teams feeding back on any areas where we could improve, pooling our expertise with theirs. About 6 weeks of programmer time was spent pre-shipping on SLI/Crossfire scaling - we needed another 4 weeks since we went gold because of the complexity of implementing this in such a large engine. Both GPU makers have devoted a lot of time to some complex issues.

So yes, the upcoming patch includes SLI/Crossfire scaling. To give you an example a GTX 295 will go from 48fps to nearly 70fps in 1080p. Also the rendering team found some further optimizations so that normal (non SLI) graphics performance should be 5-10% faster with the patch."

Lastly, there are some fixes for some of the problems encountered in Shift 2, which you can read about in the full post.

Discuss on the forums

Tagging

± shift, mlaa, msaa, xbox, ps3, radeon, crossfire, sli, renderer

Related News

Diving into Anti-Aliasing
RWT explores Haswell's eDRAM for graphics
ATI shoots a Bolt through its GPU compute stack
AMD releases CodeXL 1.0
Travelling in Style: Beyond3D's C++ AMP contest
Analysis of Ivy Bridge Graphics Architecture at RWT
RWT analyzes Kepler's architecture
Nvidia 680 GTX (Kepler) Released
Microsoft Releases C++ AMP Open Specification
Nvidia's 2x Guaranteed Program