DirectX 11 performance first look: Dirt 2

December 1, 2009 | 18:10

Tags: #directx-11 #dirt-2 #dx11 #occlusion #racing #tessellation

Companies: #codemasters

Full floating point HDR lighting

High dynamic range lighting (HDR) is a technique dating back to the days of Far Cry and Half Life 2, and while some developers may initially have struggled to apply it in a realistic or attractive manner, it’s now firmly established as a key 3D graphics technique. According to AMD:

Dirt 2 makes use of high dynamic range (HDR) lighting... in DirectX 9 this is done using the standard fixed point R8G8B8A8 texture format, and therefore the HDR effect is achieved... at the expense of the colour depth of the main scene. In DirectX 11 mode a full floating point R16G16B16A16 texture format is used, and this allows for true over bright colour ranges, while still preserving the colour depth of the main scene. This leads to a general bump in overall rendering quality.

High Definition Ambient Occlusion

In the real world, completely flat surfaces are relatively rare – even roads and pavements contain multiple cracks and bumps – and this means that modelling the real world using flat shapes (polygons) is problematic. Using more polygons to model bumps and dips is hugely inefficient in terms of time and computing resources, so programmers and graphics designers have tried coming up with a variety of methods to add the illusion of depth to surfaces which are actually flat. One way to do this is via lighting.

DirectX 11 performance first look: Dirt 2 Further techniques and impressions DirectX 11 performance first look: Dirt 2 Further techniques and impressions
DirectX 9...............................................................DirectX 11

Techniques such as normal mapping are increasingly being added to by screen space ambient occlusion, a technique first used in Crysis. Occlusion means ‘blocked’ or ‘obstructed’, and in computer graphics, ambient occlusion refers to details which are obscured (partially or fully) by other nearby details. To execute this technique, the program checks a scene’s depth buffer, working out what details will be in shadow by referencing the depth of other, nearby pixels. Dirt 2 uses high definition ambient occlusion, accelerated by DirectX 11’s Compute Shader. According to AMD’s document:

High definition ambient occlusion is a form of screen space ambient occlusion (SSAO)... at its core, it detects valleys in depth. The overall effect is to add shading where light finds it harder to reach. To achieve a high quality result this effect needs to perform many samples from the depth buffer, and therefore comes at a high cost. In DirectX 11 mode Dirt 2 utilizes the Compute Shader to greatly accelerate this technique, and it does this by using the on chip Local Data Store to effectively cache a tiled region of the depth buffer, therefore saving a great deal of texture sampling burden.”

Full screen resolution post processing

In its write-up of this technique, AMD’s technical document reveals that, “Dirt 2 utilises post processing techniques to achieve the final image. In DirectX 9 mode some of this post processing is executed at a quarter of the full screen resolution to save on rendering time. In DirectX 11 mode the engine opts for a high quality approach and performs these stages at full screen resolution.

AMD goes on to say that the benefits of this approach are “particularly noticeable with the two pass Gaussian filtering performed on the light glows on night time tracks.” Unfortunately, the demo only contains two tracks, both of which are set during the day, so we weren’t able to check out the validity of this claim.

The DirectX 11 Factor

So that's what AMD and Codemasters claim we'll see; with the demo downloaded and installed, we decided to see for ourselves. If you fire the game up on a machine with a Radeon HD 5000-series card, and you're running Windows 7 or Windows Vista SP2 with the latest Microsoft updates applied then the game will run in DirectX 11 mode by default. If your rig doesn’t mean these requirements then the game will run in DirectX 9 mode by default - there's no way to dictate the codepath in the game's menus.

However, you can force DirectX 9 mode by altering a few config files. Why ever would you want to do that? Well, testing aisde, in the demo, DirectX 11 mode appears to cap the frame rate at 60fps whereas DirectX 9 mode appears to have no such a cap (AMD has since contacted us to confirm this isn't the case; there's no frame rate cap). If you're running a low-end DirectX 11 card such as a Radeon HD 5770 and a large display, the extra frame rates may turn out to be so welcome you'd have a tough job resisting to offer them tea and scones.

To force DirectX 9 mode, head into the Documents folder in Windows, followed by My Games and head into the Dirt 2 Folder. Here you will find a final folder titled Hardware Settings which contains an XML file called hardware_settings_config.xml. Right click the file and select Edit to open the file in Word Pad. Find the line of code that says "forcedx9=false" and change it to "forcedx9=true". Your game will now run in DirectX 9 mode.

"Thank you Gamesmaster..."

If you require confirmation that DirectX 9 mode has indeed been forced then enter the options menu in game and see if the ambient occlusion setting is still present. If it's been removed then you're ready for some DirectX 9 love, if not then you’ve most likely made a typo and will need to go and correct it.
Discuss this in the forums
YouTube logo
MSI MPG Velox 100R Chassis Review

October 14 2021 | 15:04