2 Dragon Age II DX11 Technology Andreas PapathanasisBioWare
3 Sequel to the successful RPG Dragon Age: Origins Focus on combat, magic, cinematicsRebooted Art Style, focus on Graphics technologyOut next week onPC / Xbox 360 / PS3
4 Our pitch for DX11 technology We discussed within our project tiered options for taking advantage of next generation PC GPUs:Tier 0: DX9 with very high quality shadersTier 1: Basic DX11 integrationNo compute or tessellation shadersTakes advantage of shader models 4 and 5Tier 2: Typical DX11 integrationCompute and tessellation shaders fully supportedTier 3: Advanced DX11 integrationMultithreadingRequires significant refactoring of the higher level engineEach tier costs more than the previous one. But also brings more benefits to the project and the studio’s technology in the long run.We went to our PM with these options, presenting benefits and cost to implement each tier. We recommended Tier 2 as the best tradeoff between benefit and engineering/testing effort.I will present the same arguments it took for us to convince our project this is worthwhile.Picture shows an example screenshot from the pitch document that demonstrates potential terrain rendering improvements with DX11 + tessellation technology.
5 Why DirectX 11?Opportunities to integrate well documented, impactful visual features using SM4/SM5, new shader stagesGuaranteed feature set (no cap bits)Great way for programming and art teams to prepare for the next generationPowerful, evolving debugging toolsGuaranteed functionality means we no longer have to code for different implementation levels and provide alternatives based on caps checks.Another unexpected advantage from DX11 was advanced GPU debugging tools from both hardware vendors, that work on DX11 only. These tools helped us identify and fix issues with all versions of our game.We expect many of the techniques we investigated (and likely the API itself) to be very relevant next generation
6 GPU PerfStudio 2 – Shader Debugging on DX10/DX11
7 Why DirectX 11? Steam hardware survey Reliable backwards compatibility with older hardwareCustomers have the hardware and expect games that use itSteam hardware surveyThe main reason we still support a DX9 rendering path is support for Windows XP. We expect our next project to be DX11 only.Various data shows a wide adoption of DirectX 10 and higher GPUs. Customers who invented in them are expecting to get something more out of PC games.
8 DirectX 11 features overview Dynamic lightingTessellationDiffusion Depth of FieldContact hardening soft shadows
11 Dynamic Lighting Light buffer Based on the popular light pre-pass methodExtra pass to render scene normalsRender all dynamic light spheres to a light bufferAllows for hundreds of lightsMinimal engineering effort to integrate on DX11:Multiple render targets work with MSAAGuaranteed render target format supportSmall per-draw overhead on the CPUMakes a lot of sense for a spell-rich game like Dragon Age IILight bufferOur base DX9 forward rendering architecture only allows for 2 dynamic lights per object.
12 Tessellation Big research focus for the team Great potential for taking geometric detail to the next levelLends itself to LOD naturally, without affecting CPU or complicating the engine codebase
13 Tessellation challenges Piecewise level constructioncan cause gaps between adjacent objects when normals don’t match at the edgeswould require content to be redone for DX11fell back to parallax mapping techniques for displaced lookongoing research topic for our next projectsSome content (i.e. characters) is already tessellated at desired density for non DX11 platformsOn Dragon Age II we used tessellation for terrain silhouette smoothing (using PN triangles algorithm)
14 Tessellation on terrain Without tessellationWith tessellationPN triangles algorithm is ideal for surfaces that are supposed to be smooth (like terrain here).
15 Tessellation performance VERY easy to kill performance with excessive tessellationPerformance improvements that made a difference in our engine (sorted in order of the performance win we got):Only tessellate objects close enough to the cameraLOD in the hull shaderView frustum culling (important for high polygon objects that span a large area, like terrain)Distance adaptive tessellation factorOnly tessellate objects that will end up being visible (occlusion culling even more relevant if you’re rendering lots of tessellated objects)
16 Diffusion Depth of Field Custom multi-pass Diffusion DOF solverTechnique will be described by Holger Gruen later today, and appear in Game Engine Gems 2Much higher quality than our DX9 DOF solution, almost as efficient
21 Contact hardening shadows High quality shadow filterAccelerated by GatherRed/GatherCmpRed Shader Model 5 instructionsShader source code in the DirectX SDKTrivial to integrate, great visual quality improvement for directional shadows
24 Conclusion API and market is mature Lots of algorithms available that can enhance your particular style of gameInitial investment in DX11 integration should pay off quicklyHardware vendors can help youYou should weight the cost of integrating DX11 technology against the tradeoffs. The sooner you do it . For us, we got significant benefits in the quality of our first DX11 game.Both hardware vendors are extremely helpful when it comes to providing integration and optimization assistance. They can also suggest features that can benefit your game.