Introduction to Direct3D 10 Course Porting Game Engines to Direct3D 10: Crysis / CryEngine2 Carsten Wenzel.

Slides:



Advertisements
Similar presentations
Destruction Masking in Frostbite 2 using Volume Distance Fields
Advertisements

Advanced Virtual Texture Topics
Accelerating Real-Time Shading with Reverse Reprojection Caching Diego Nehab 1 Pedro V. Sander 2 Jason Lawrence 3 Natalya Tatarchuk 4 John R. Isidoro 4.
Exploration of advanced lighting and shading techniques
POST-PROCESSING SET09115 Intro Graphics Programming.
DirectX11 Performance Reloaded
Multi-monitor Game Development Thomas Fortier AMD Graphics Developer Relations
Maximizing Multi-GPU Performance
Multi-user Extensible Virtual Worlds Increasing complexity of objects and interactions with increasing world size, users, numbers of objects and types.
© Copyright Khronos Group, Page 1 COLLADA FX Update and FX Composer 2.0 Daniel Horowitz & Ignacio Castaño.
DirectX Graphics: Direct3D 10 and Beyond
Dragon Age II DX11 Technology
Stefan Roettger, VIS Group, University of Stuttgart Ingo Frick, Massive Development, Mannheim The Terrain Rendering Pipeline
COMPUTER GRAPHICS CS 482 – FALL 2014 NOVEMBER 10, 2014 GRAPHICS HARDWARE GRAPHICS PROCESSING UNITS PARALLELISM.
Lecture 38: Chapter 7: Multiprocessors Today’s topic –Vector processors –GPUs –An example 1.
Understanding the graphics pipeline Lecture 2 Original Slides by: Suresh Venkatasubramanian Updates by Joseph Kider.
Graphics Hardware CMSC 435/634. Transform Shade Clip Project Rasterize Texture Z-buffer Interpolate Vertex Fragment Triangle A Graphics Pipeline.
ADVANCED SKIN SHADING WITH FACEWORKS Nathan Reed — NVIDIA March 24, 2014.
Programming Languages Marjan Sirjani 2 2. Language Design Issues Design to Run efficiently : early languages Easy to write correctly : new languages.
GI 2006, Québec, June 9th 2006 Implementing the Render Cache and the Edge-and-Point Image on Graphics Hardware Edgar Velázquez-Armendáriz Eugene Lee Bruce.
Strategies and Techniques for Real-Time Shaders Neil Hazzard Software Engineer Autodesk, Media and Entertainment.
Rasterization and Ray Tracing in Real-Time Applications (Games) Andrew Graff.
IN4151 Introduction 3D graphics 1 Introduction to 3D computer graphics part 2 Viewing pipeline Multi-processor implementation GPU architecture GPU algorithms.
ATI GPUs and Graphics APIs Mark Segal. ATI Hardware X1K series 8 SIMD vertex engines, 16 SIMD fragment (pixel) engines 3-component vector + scalar ALUs.
The programmable pipeline Lecture 10 Slide Courtesy to Dr. Suresh Venkatasubramanian.
Functional Simulation Overview1 OpenTV PC Simulator.
AGD: 5. Game Arch.1 Objective o to discuss some of the main game architecture elements, rendering, and the game loop Animation and Games Development.
GPU Graphics Processing Unit. Graphics Pipeline Scene Transformations Lighting & Shading ViewingTransformations Rasterization GPUs evolved as hardware.
The POSTGRES Next - Generation Database Management System Michael Stonebraker Greg Kemnitz Presented by: Nirav S. Sheth.
High Performance in Broad Reach Games Chas. Boyd
Secure Embedded Processing through Hardware-assisted Run-time Monitoring Zubin Kumar.
Antigone Engine Kevin Kassing – Period
Chris Kerkhoff Matthew Sullivan 10/16/2009.  Shaders are simple programs that describe the traits of either a vertex or a pixel.  Shaders replace a.
Overview [See Video file] Architecture Overview.
Porting Unity to new APIs Aras Pranckevičius Unity Technologies.
CSE 690: GPGPU Lecture 6: Cg Tutorial Klaus Mueller Computer Science, Stony Brook University.
Stream Processing Main References: “Comparing Reyes and OpenGL on a Stream Architecture”, 2002 “Polygon Rendering on a Stream Architecture”, 2000 Department.
Andrew S. Budarevsky Adaptive Application Data Management Overview.
Computer Graphics The Rendering Pipeline - Review CO2409 Computer Graphics Week 15.
Tone Mapping on GPUs Cliff Woolley University of Virginia Slides courtesy Nolan Goodnight.
Efficient RDF Storage and Retrieval in Jena2 Written by: Kevin Wilkinson, Craig Sayers, Harumi Kuno, Dave Reynolds Presented by: Umer Fareed 파리드.
Useful Tools for Making Video Games Part II An overview of.
Ritual ™ Entertainment: Next-Gen Effects on Direct3D ® 10 Sam Z. Glassenberg Program Manager Microsoft ® – Direct3D ® Doug Service Director of Technology.
NVIDIA FX Composer 2 Shader Authoring for Everyone Philippe Rollin Aravind Kalaiah.
A SEMINAR ON 1 CONTENT 2  The Stream Programming Model  The Stream Programming Model-II  Advantage of Stream Processor  Imagine’s.
Computer Graphics 3 Lecture 6: Other Hardware-Based Extensions Benjamin Mora 1 University of Wales Swansea Dr. Benjamin Mora.
Emerging Technologies for Games Capability Testing and DirectX10 Features CO3301 Week 6.
Antigone Engine. Introduction Antigone = “Counter Generation” Library of functions for simplifying 3D application development Written in C for speed (compatible.
DX10, Batching, and Performance Considerations Bryan Dudash NVIDIA Developer Technology.
Advanced D3D10 Shader Authoring Presentation/Presenter Title Slide.
T EST T OOLS U NIT VI This unit contains the overview of the test tools. Also prerequisites for applying these tools, tools selection and implementation.
Postmortem: Deferred Shading in Tabula Rasa Rusty Koonce NCsoft September 15, 2008.
Build your own 2D Game Engine and Create Great Web Games using HTML5, JavaScript, and WebGL. Sung, Pavleas, Arnez, and Pace, Chapter 5 Examples 1.
Veysi ISLER, Department of Computer Engineering, Middle East Technical University, Ankara, TURKEY Spring
How to use a Pixel Shader CMT3317. Pixel shaders There is NO requirement to use a pixel shader for the coursework though you can if you want to You should.
Lecture Rendering pipeline, shaders and effects 1Elias Holmlid.
1 Geometry for Game. Geometry Geometry –Position / vertex normals / vertex colors / texture coordinates Topology Topology –Primitive »Lines / triangles.
VMGL: VMM-Independent Graphics Acceleration H. Andrés Lagar-Cavilla, U of Toronto Niraj Tolia (CMU), Eyal de Lara (Toronto), M.
From VIC (VRVS) to ViEVO (EVO) 3 years of experiences with developing of video application VIC for VRVS allowed us to develop a new video application.
GPU Architecture and Its Application
Graphics Processing Unit
Chapter 6 GPU, Shaders, and Shading Languages
TerraForm3D Plasma Works 3D Engine & USGS Terrain Modeler
UE4 Vulkan Updates & Tips
RADEON™ 9700 Architecture and 3D Performance
Computer Graphics Introduction to Shaders
CIS 441/541: Introduction to Computer Graphics Lecture 15: shaders
03 | Creating, Texturing and Moving Objects
Games Development 2 Tools Programming
CIS 6930: Chip Multiprocessor: GPU Architecture and Programming
Presentation transcript:

Introduction to Direct3D 10 Course Porting Game Engines to Direct3D 10: Crysis / CryEngine2 Carsten Wenzel

Overview Introduction Introduction D3D10 & CryEngine2 D3D10 & CryEngine2 Porting, integration issues and optimizations Porting, integration issues and optimizations Random bits Random bits Conclusion Conclusion

Introduction Early adaptation Early adaptation Spec reviews / discussions started in 2005 Spec reviews / discussions started in 2005 Actual work began middle 2006 Actual work began middle 2006 Support from MS and IHVs was crucial Support from MS and IHVs was crucial

D3D10 in context of a multi-platform engine (1/3) API redesign offers a more concise view on how modern graphics hardware works API redesign offers a more concise view on how modern graphics hardware works For the sake of performance it offloads a lot of responsibility to the API user For the sake of performance it offloads a lot of responsibility to the API user

D3D10 in context of a multi-platform engine (2/3) CryEngine2 is designed to be multi-platform CryEngine2 is designed to be multi-platform Render implementations share one interface and a lot of common code Render implementations share one interface and a lot of common code – State & resource management – Draw list processing – Shader subsystem, etc.

D3D10 in context of a multi-platform engine (3/3) Certain API changes required special consideration Certain API changes required special consideration – State objects – Shader model 4.0 – Constant buffers – Strict API validation (shader linkage, etc) – Buffer updates Support for new features Support for new features – E.g. Geometry Shader, Stream Out, Texture Arrays

Porting and making it work (1/2) Render code separates platform / API dependent parts from independent parts Render code separates platform / API dependent parts from independent parts D3D10 renderer specializes base renderer D3D10 renderer specializes base renderer Inherits interface and all common code Inherits interface and all common code

Porting and making it work (2/2) Platform / API dependent parts wrapped and called from common code Platform / API dependent parts wrapped and called from common code Provided stubs implemented one at a time Provided stubs implemented one at a time #ifdef where API characteristics were awkward to map to common code flow #ifdef where API characteristics were awkward to map to common code flow

Special considerations (1/5): State objects Need fine grained control over render states! Need fine grained control over render states! Wrap state manipulation Wrap state manipulation Internally caches state objects Internally caches state objects Currently build state objects on demand Currently build state objects on demand Pre-warming cache might be worthwhile Pre-warming cache might be worthwhile

Special considerations (2/5): Shader model 4.0 Use custom shader / effect system Use custom shader / effect system Updated to support new API features and enhanced HLSL syntax Updated to support new API features and enhanced HLSL syntax Query resource bindings via Shader Reflection Query resource bindings via Shader Reflection Compile existing shaders as is (/Gec) Compile existing shaders as is (/Gec) Refactored to utilize load balancing Refactored to utilize load balancing Still use shader cache Still use shader cache

Special considerations (3/5): Constant buffers Group constants by frequency of update Group constants by frequency of update Each group maps to a unique CB index Each group maps to a unique CB index Constants bound via semantic which encodes group id Constants bound via semantic which encodes group id Allows preprocessor to move constants into their appropriate CB scope Allows preprocessor to move constants into their appropriate CB scope – Existing shaders automatically benefit from efficient binding – Source shader scripts devoid of API specific annotations – Shader authors dont have to worry about API

Special considerations (4/5): Strict API validation API rigorously checks how user drives it API rigorously checks how user drives it Simplifies lower API / driver levels Simplifies lower API / driver levels Example: Shader linkage Example: Shader linkage – Vertex layout / output signature has to match input signatures of following shader – Dimension of each passed element has to match dimension expected in following shader – Took some time to clean up / unify signatures – Nice side effect: Signature-fixed shaders run faster on DX9

Special considerations (5/5): Buffer updates Update methods for truly static / dynamic buffers remain as in D3D9 Update methods for truly static / dynamic buffers remain as in D3D9 Occasional updates of static buffers can cause severe pipeline stalls (e.g. updating terrain) Occasional updates of static buffers can cause severe pipeline stalls (e.g. updating terrain) Staging resources as intermediate storage Staging resources as intermediate storage This way mesh update can be pipelined This way mesh update can be pipelined

Random DX10 bits used in CryEngine2 GS used for particles and shadows GS used for particles and shadows Viewports for texture atlas Viewports for texture atlas Filtered texture lookups in vertex shader (FFT water) Filtered texture lookups in vertex shader (FFT water) Multi-sampled texture lookup (HDR post-processing) Multi-sampled texture lookup (HDR post-processing) Sample depth from z buffer Sample depth from z buffer Render to volume texture Render to volume texture

New D3D10 features are great New D3D10 features are great Perf improvements are definitely there Perf improvements are definitely there Expect several code revisions to drive the API in the most efficient way Expect several code revisions to drive the API in the most efficient way Conclusion

More details [1] Finding Next-Gen, Martin Mittring, SIGGRAPH 2007 [1] Finding Next-Gen, Martin Mittring, SIGGRAPH 2007 – Part of course 28, Advanced Real-time Rendering in 3D Graphics in Games – Wed Aug 8 th, Room 7AB, 8:30 am - 5:30 pm [2] Real-time Atmospheric Effects in Games Revisited, Carsten Wenzel, GDC 2007 [2] Real-time Atmospheric Effects in Games Revisited, Carsten Wenzel, GDC 2007 – Slides and course notes available online

Acknowledgements Crytek R&D Graphics Group Crytek R&D Graphics Group Many thanks to MS, NVIDIA and ATI for the support Many thanks to MS, NVIDIA and ATI for the support

Questions? *