Introduction to the Direct3D 11 Graphics Pipeline

Slides:



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

Advanced Visual Effects with Direct3D
DirectX11 Performance Reloaded
DirectX Graphics: Direct3D 10 and Beyond
Introduction to Direct3D 12
Dragon Age II DX11 Technology
D3D11 Tessellation Sarah Tariq NVIDIA
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 Pipeline.
RealityEngine Graphics Kurt Akeley Silicon Graphics Computer Systems.
Graphics Hardware CMSC 435/634. Transform Shade Clip Project Rasterize Texture Z-buffer Interpolate Vertex Fragment Triangle A Graphics Pipeline.
Richard Thomson DAZ 3D Direct3D 11  CTP in November 2008 DirectX SDK  Vista (and beyond) only, not on XP  Evolution of Direct3D 10 
Real-Time Rendering TEXTURING Lecture 02 Marina Gavrilova.
The Programmable Graphics Hardware Pipeline Doug James Asst. Professor CS & Robotics.
Damon Rocco.  Tessellation: The filling of a plane with polygons such that there is no overlap or gap.  In computer graphics objects are rendered as.
Rasterization and Ray Tracing in Real-Time Applications (Games) Andrew Graff.
A Crash Course on Programmable Graphics Hardware Li-Yi Wei 2005 at Tsinghua University, Beijing.
© David Kirk/NVIDIA and Wen-mei W. Hwu, ECE408, University of Illinois, Urbana-Champaign 1 Programming Massively Parallel Processors Chapter.
3D Graphics Processor Architecture Victor Moya. PhD Project Research on architecture improvements for future Graphic Processor Units (GPUs). Research.
IN4151 Introduction 3D graphics 1 Introduction to 3D computer graphics part 2 Viewing pipeline Multi-processor implementation GPU architecture GPU algorithms.
Status – Week 277 Victor Moya.
Pixel Shader Vertex Shader The Real-time Graphics Pipeline Input Assembler Rasterizer Output Merger.
The Graphics Pipeline CS2150 Anthony Jones. Introduction What is this lecture about? – The graphics pipeline as a whole – With examples from the video.
The programmable pipeline Lecture 10 Slide Courtesy to Dr. Suresh Venkatasubramanian.
GPU Graphics Processing Unit. Graphics Pipeline Scene Transformations Lighting & Shading ViewingTransformations Rasterization GPUs evolved as hardware.
University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology Beyond Meshes Spring 2012.
OPTIMIZING AND DEBUGGING GRAPHICS APPLICATIONS WITH AMD'S GPU PERFSTUDIO 2.5 GPG Developer Tools Gordon Selley Peter Lohrmann GDC 2011.
High Performance in Broad Reach Games Chas. Boyd
REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006 Real-Time Volume.
GPU Programming Robert Hero Quick Overview (The Old Way) Graphics cards process Triangles Graphics cards process Triangles Quads.
Interactive Time-Dependent Tone Mapping Using Programmable Graphics Hardware Nolan GoodnightGreg HumphreysCliff WoolleyRui Wang University of Virginia.
4/23/2017 4:23 AM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered.
CS 450: COMPUTER GRAPHICS REVIEW: INTRODUCTION TO COMPUTER GRAPHICS – PART 2 SPRING 2015 DR. MICHAEL J. REALE.
The Graphics Rendering Pipeline 3D SCENE Collection of 3D primitives IMAGE Array of pixels Primitives: Basic geometric structures (points, lines, triangles,
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.
Computer Graphics The Rendering Pipeline - Review CO2409 Computer Graphics Week 15.
Advanced Computer Graphics Advanced Shaders CO2409 Computer Graphics Week 16.
Tone Mapping on GPUs Cliff Woolley University of Virginia Slides courtesy Nolan Goodnight.
MIRALab Where Research means Creativity SVG Open 2005 University of Geneva 1 Converting 3D Facial Animation with Gouraud shaded SVG A method.
Game Programming 06 The Rendering Engine
Maths & Technologies for Games DirectX 11 – New Features Tessellation & Displacement Mapping CO3303 Week 19.
Ritual ™ Entertainment: Next-Gen Effects on Direct3D ® 10 Sam Z. Glassenberg Program Manager Microsoft ® – Direct3D ® Doug Service Director of Technology.
Xbox MB system memory IBM 3-way symmetric core processor ATI GPU with embedded EDRAM 12x DVD Optional Hard disk.
Computer Graphics 3 Lecture 6: Other Hardware-Based Extensions Benjamin Mora 1 University of Wales Swansea Dr. Benjamin Mora.
Maths & Technologies for Games Graphics Optimisation - Batching CO3303 Week 5.
Fateme Hajikarami Spring  What is GPGPU ? ◦ General-Purpose computing on a Graphics Processing Unit ◦ Using graphic hardware for non-graphic computations.
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 29, 2015 RENDERING RASTERIZATION RAY CASTING PROGRAMMABLE SHADERS.
Ray Tracing using Programmable Graphics Hardware
What are shaders? In the field of computer graphics, a shader is a computer program that runs on the graphics processing unit(GPU) and is used to do shading.
UW EXTENSION CERTIFICATE PROGRAM IN GAME DEVELOPMENT 2 ND QUARTER: ADVANCED GRAPHICS The GPU.
Advanced D3D10 Shader Authoring Presentation/Presenter Title Slide.
GPU Computing for GIS James Mower Department of Geography and Planning University at Albany.
An Introduction to the Cg Shading Language Marco Leon Brandeis University Computer Science Department.
Computer Graphics Lecture 32
A Crash Course on Programmable Graphics Hardware
Build /24/2018 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Graphics Processing Unit
Chapter 6 GPU, Shaders, and Shading Languages
The Graphics Rendering Pipeline
CS451Real-time Rendering Pipeline
Understanding Theory and application of 3D
The Small batch (and Other) solutions in Mantle API
Graphics Processing Unit
RADEON™ 9700 Architecture and 3D Performance
Computer Graphics Introduction to Shaders
CIS 441/541: Introduction to Computer Graphics Lecture 15: shaders
OpenGL-Rendering Pipeline
Presentation transcript:

Introduction to the Direct3D 11 Graphics Pipeline Allison Klein Senior Lead Program Manager Direct3D Microsoft

Executive Summary: D3D 11 Direct3D 11 focuses on scalability and performance, a creating a better development experience, and extending the reach of the GPU Direct3D 11 is a strict superset of D3D 10 & 10.1 D3D 11 adds support for new features to D3D 10.1 The fastest way to move to Direct3D 11 is to start developing on Direct3D 10/10.1 today Direct3D 11 will be available on Windows Vista & future Windows operating systems Direct3D 11 will run on down-level hardware You can all go back to sleep now.

Outline Overview Drilldown Summary

Direct3D 10 Cleaner API  Easier coding than Direct3D 9 More efficient DDI  Driver Optimization A more consistent experience across hardware! Tighter specification Elimination of caps

Direct3D 10.1 Improved multisampling Improved fixed-function blending MSAA depth access in shader Expose sample positions Explicit coverage control 4-sample MSAA required Improved fixed-function blending Per-MRT blend mode 16-bit integer blending Arrays of cube maps

Direct3D 10.1 (Cont’d) Improved performance over Direct3D 10 6-10% for common cases 20-30% for applications relying on MSAA such as deferred shading engines Algorithms closer to Direct3D 11 and future APIs

Direct3D Issues/Opportunities Scalability Performance Cross-Platform Content and Techniques General-Purpose Data-Parallel Computing

Outline Overview Drilldown Summary

Outline Overview Drilldown Summary Tessellation Compute Shader Multithreading Dynamic Shader Linkage Improved Texture Compression Quick Glance at Other Features Summary

Current Authoring Pipeline (Rocket Frog Taken From Loop &Schaefer, "Approximating Catmull-Clark Subdivision Surfaces with Bicubic Patches“) Sub-D Modeling Animation Displacement Map Polygon Mesh Generate LODs

Character Authoring (Cont’d) Trends Denser meshes, more detailed characters ~5K triangles -> 30-100K triangles More complex animations Animations on polygon mesh vertices more costly Result Indirection in authoring pipeline more painful Painful I/O issues Solution Use higher-level surface representation longer Animate control cage (~5K vertices) Generate displacement & normal maps

Direct3D 10 pipeline Plus Three new stages for Tessellation Input Assembler Direct3D 10 pipeline Plus Three new stages for Tessellation Vertex Shader Hull Shader Tessellator Domain Shader Stream Output Geometry Shader Rasterizer Pixel Shader Output Merger

Hull Shader (HS) One Hull Shader invocation per patch HS input: patch control pts One Hull Shader invocation per patch Hull Shader HS output: Patch control pts after Basis conversion HS output: TessFactors (how much to tessellate) fixed tessellator mode declarations Tessellator Domain Shader

Fixed-Function Tessellator (TS) Hull Shader Note: Tessellator does not see control points TS input: TessFactors (how much to tessellate) fixed tessellator mode declarations Tessellator TS output: U V {W} domain points TS output: topology (to primitive assembly) Domain Shader Tessellator operates per patch

Domain Shader (DS) Hull Shader Tessellator DS input: control points TessFactors DS input: U V {W} domain points Domain Shader One Domain Shader invocation per point from Tessellator DS output: one vertex

Direct3D 11 Pipeline D3D11 HW Feature D3D11 Only Input Assembler Vertex Shader D3D11 HW Feature D3D11 Only Fundamental primitive is patch (not triangle) Superset of Xbox 360 tessellation Hull Shader Tessellator Domain Shader Stream Output Geometry Shader Rasterizer Pixel Shader Output Merger

Example Surface Processing Pipeline Single-pass process! vertex shader hull shader tessellator domain shader Animate/skin Control Points Transform basis, Determine how much to tessellate Tess Factors Tessellate! Evaluate surface including displacement patch control points transformed control points control points in Bezier patch U V {W} domain points Sub-D Patch Bezier Patch displacement map

New Authoring Pipeline (Rocket Frog Taken From Loop &Schaefer, "Approximating Catmull-Clark Subdivision Surfaces with Bicubic Patches“) Sub-D Modeling Animation Displacement Map Optimally Tessellated Mesh GPU

Tessellation: Summary Helps us get closer to eliminating “pointy heads” Scales visual quality across PC hardware configurations Supports performance increases Coarse model = compression, faster I/0 to GPU Rendering tailored to each end user’s hardware Better cross-platform (Windows + Xbox 360) development experience Xbox 360 has a subset of D3D11’s tessellation Parity = ease of cross-platform development Extra features = innovation for Windows gaming Render content as the artist created it!

Want to Know More? “Direct3D 11 Tessellation” Tuesday, 4:00-4:55pm (Next) Kev Gee (Microsoft) “Advanced Topics in GPU Tessellation” Wednesday, 10:15-11:10am Natasha Tatarchuk (AMD) “Water-Tight, Textured, Displaced Subdivision Surface Tessellation Using Direct3D 11” Wednesday, 1:30-2:25pm Ignacio Castano (NVIDIA)

Outline Overview Drilldown Summary Tessellation Compute Shader Multithreading Dynamic Shader Linkage Improved Texture Compression Quick Glance at Other Features Summary

GPGPU = Data Parallel Computing 4/6/2017 5:47 AM GPGPU = Data Parallel Computing GPU performance continues to grow Many applications scale well to massive parallelism without tricky code changes Direct3D is the API for talking to GPU How do we expand Direct3D to GPGPU?

Direct3D 11 Pipeline Input Assembler Direct3D 10 pipeline Plus Three new stages for Tessellation Compute Shader Vertex Shader Hull Shader Tessellator Domain Shader Stream Output Geometry Shader Rasterizer Data Structure Compute Shader Pixel Shader Output Merger

Integration with Direct3D Fully supports all Direct3D resources Targets graphics/media data types Evolution of DirectX HLSL Graphics pipeline updated to emit general data structures… …which can then be manipulated by compute shader… And then rendered by Direct3D again

Example Scenario Render scene Write out scene image Input Assembler Render scene Write out scene image Use Compute for image post-processing Output final image Vertex Shader Hull Shader Tessellator Domain Shader Stream Output Geometry Shader Rasterizer Data Structure Compute Shader Pixel Shader Output Merger

Target Applications Image/Post processing: A-Buffer/OIT Image Reduction Image Histogram Image Convolution Image FFT A-Buffer/OIT Ray-tracing, radiosity, etc. Physics AI

Compute Shader: Summary Enables much more general algorithms Transparent parallel processing model Full cross-vendor support Broadest possible installed base

Want to Know More? “Direct3D 11 Compute Shader— More Generality for Advanced Techniques” Wednesday, 4:00-4:55pm Chas Boyd (Microsoft)

Outline Overview Drilldown Summary Tessellation Compute Shader Multithreading Dynamic Shader Linkage Improved Texture Compression Quick Glance at Other Features Summary

Multithreading Today Physics Graphics AI GPU

Multithreading Today CPU-Bound Graphics Physics AI GPU

D3D11 Multithreading Usage Enables distribution across threads of Application code Runtime Driver Device: free threaded resource creation Immediate Context: your single primary device for state & draws Deferred Contexts: your per-thread devices for state & draws Display Lists: Recorded sequence of graphics commands

Direct3D 11 Multithreading Now, the following can be distributed across threads: Application Direct3D 11 Runtime Direct3D 11 Drivers Updated Direct3D 10 and 10.1 Drivers

Direct3D 11 Multithreading Application Direct3D 11 Runtime Existing 10/10.1 Drivers Direct3D 11 Driver Direct3D 10/10.1 HW Direct3D 11 HW

Direct3D 11 Multithreading Application Direct3D 11 Runtime New 10/10.1 Drivers Direct3D 11 Driver Direct3D 10/10.1 HW Direct3D 11 HW

Multithreading: Summary Improves performance Scalable across hardware configurations in two ways: # of CPUs Graphics cards/drivers Better cross-platform (Windows+Xbox 360) development experience

Want to Know More? “Multithreaded Rendering for Games” Wednesday, 1:30-2:25pm Matt Lee (Microsoft)

Outline Overview Drilldown Summary Tessellation Compute Shader Multithreading Dynamic Shader Linkage Improved Texture Compression Quick Glance at Other Features Summary

Shader Issues Today Shaders getting bigger, more complex Shaders need to target wide range of hardware Two approaches today: Write specialized shaders Good: Build optimal shaders as specializations Bad: Generates lots of shaders Write “one shader to rule them all” Combines multiple shaders Good: Reduces shader binding changes Bad: Code is complex Answer: Subroutines

Shader Subroutines Über-shader Dynamic Subroutine foo (…) { if (m == 1) { // do material 1 } else if (m == 2) { // do material 2 } if (l == 1) { // do light model 1 } else if (l == 2) { // do light model 2 Material1(…) { … } Material2(…) { … } Light1(…) { … } Light2(…) { … } foo(…) { (*material)(…); (*light)(…); } Application binds appropriate *material, *light

Shader Subroutines Details Advantages Calls must be fast Binding applies to all primitives in a Draw call Binding operation must be fast Need parameter passing mechanism Need access to textures, samplers, etc. Advantages Reduce register usage in Über-shaders Not worst case of all if statements Allows specialization of subroutines

Want to Know More? “High Level Shader Language (HLSL) Update—Introducing Version 5.0” Tuesday, 5:05-6:00pm Michael Oneppo (Microsoft)

Outline Overview Drilldown Summary Tessellation Compute Shader Multithreading Dynamic Shader Linkage Improved Texture Compression Quick Glance at Other Features Summary

Why New Texture Formats? Existing block palette interpolations too simple Results often rife with blocking artifacts No high dynamic range (HDR) support NB: All are issues we heard from developers

Two New BC’s for Direct3D11 BC6 (aka BC6H) High dynamic range 6:1 compression (16 bpc RGB) Targeting high (not lossless) visual quality BC7 LDR with alpha 3:1 compression for RGB or 4:1 for RGBA High visual quality

New BC’s: Compression Block compression (unchanged) Each block independent Fixed compression ratio Multiple block types (new) Tailored to different types of content Smooth gradients vs. noisy normal maps Varied alpha vs. constant alpha Also new: decompression results must be bit-accurate with spec

Multiple Block Types Different numbers of color interpolation lines Less variance in one block means: 1 color line Higher-precision endpoints More variance in one block means: 2 (BC6 & 7) or 3 (BC7 only) color lines Lower-precision endpoints and interpolation bits Different numbers of index bits 2 or 3 bits to express position on color line Alpha Some blocks have implied 1.0 alpha Others encode alpha

Partitions When using multiple color lines, each pixel needs to be associated with a color line Individual bits to choose is expensive For a 4x4 block with 2 color lines 162 possible partition patterns 16 to 64 well-chosen partition patterns give a good approximation of the full set BC6H: 32 partitions BC7: 64 partitions, shares first 32 with BC6H

Example Partition Table A 32-partition table for 2 color lines

Comparisons Orig BC3 BC7 Abs Error

Comparisons Orig BC3 BC7 Abs Error

Comparisons HDR Original at given exposure Abs Error BC6 at

Outline Overview Drilldown Summary Tessellation Compute Shader Multithreading Dynamic Shader Linkage Improved Texture Compression Quick Glance at Other Features Summary

A Plethora of Other Features Addressable Stream Out Draw Indirect Pull-model attribute eval Improved Gather4 Min-LOD texture clamps 16K texture limits Required 8-bit subtexel, submip filtering precision Conservative oDepth 2 GB Resources Geometry shader instance programming model Optional double support Read-only depth or stencil views

Outline Overview Drilldown Summary Tessellation Compute Shader Multithreading Dynamic Shader Linkage Improved Texture Compression Quick Glance at Other Features Summary

Direct3D 11 Direct3D 11 is strict superset of Direct3D 10 & 10.1 Direct3D 11 adds support for features like multithreading, tessellation, compute to Direct3D 10.1 The fastest way to move to Direct3D 11 is to start developing on Direct3D 10/10.1 today Direct3D 11 will be available on Windows Vista and future Windows operating systems Direct3D 11 will run on down-level hardware Multithreading! Direct3D 10.1, 10, and 9 hardware/drivers Full functionality (for example, tessellation) will require Direct3D 11 hardware

When Can I Get It? Preview bits will be in November 2008 SDK Will work on Windows Vista Will run on Direct3D10/10.1 hardware Full documentation, samples, etc.

Questions?

www.xnagamefest.com 4/6/2017 5:47 AM © 2008 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.