Real Virtual Texturing Taking Advantage of DirectX11.2 Tiled Resources. Cem Cebenoyan Developer Technology, NVIDIA

Similar documents
Optimizing Unity Games for Mobile Platforms. Angelo Theodorou Software Engineer Unite 2013, 28 th -30 th August

Recent Advances and Future Trends in Graphics Hardware. Michael Doggett Architect November 23, 2005

Shader Model 3.0. Ashu Rege. NVIDIA Developer Technology Group

Image Processing and Computer Graphics. Rendering Pipeline. Matthias Teschner. Computer Science Department University of Freiburg

Optimizing AAA Games for Mobile Platforms

Software Virtual Textures

Radeon HD 2900 and Geometry Generation. Michael Doggett

A Short Introduction to Computer Graphics

Optimization for DirectX9 Graphics. Ashu Rege

Image Synthesis. Transparency. computer graphics & visualization

OpenGL Performance Tuning

Dynamic Resolution Rendering

How To Understand The Power Of Unity 3D (Pro) And The Power Behind It (Pro/Pro)

Workstation Applications for Windows. NVIDIA MAXtreme User s Guide

Sparse Fluid Simulation in DirectX. Alex Dunn Dev. Tech. NVIDIA

Intel 810 and 815 Chipset Family Dynamic Video Memory Technology

3D Stereoscopic Game Development. How to Make Your Game Look

Real-Time BC6H Compression on GPU. Krzysztof Narkowicz Lead Engine Programmer Flying Wild Hog

Computer Graphics Hardware An Overview

Advanced Visual Effects with Direct3D

Touchstone -A Fresh Approach to Multimedia for the PC

GPU(Graphics Processing Unit) with a Focus on Nvidia GeForce 6 Series. By: Binesh Tuladhar Clay Smith

ANDROID DEVELOPER TOOLS TRAINING GTC Sébastien Dominé, NVIDIA

Lezione 4: Grafica 3D*(II)

GPU-Driven Rendering Pipelines

How To Make A Texture Map Work Better On A Computer Graphics Card (Or Mac)

Lecture Notes, CEng 477

L20: GPU Architecture and Models

NVIDIA GeForce GTX 580 GPU Datasheet

Low power GPUs a view from the industry. Edvard Sørgård

The Future Of Animation Is Games

Deferred Shading & Screen Space Effects

Beyond 2D Monitor NVIDIA 3D Stereo

NVIDIA IndeX Enabling Interactive and Scalable Visualization for Large Data Marc Nienhaus, NVIDIA IndeX Engineering Manager and Chief Architect

ACE: After Effects CS6

CUBE-MAP DATA STRUCTURE FOR INTERACTIVE GLOBAL ILLUMINATION COMPUTATION IN DYNAMIC DIFFUSE ENVIRONMENTS

Intel 845G/GL Chipset Dynamic Video Memory Technology

Performance Optimization and Debug Tools for mobile games with PlayCanvas

What is GPUOpen? Currently, we have divided console & PC development Black box libraries go against the philosophy of game development Game

OpenGL Insights. Edited by. Patrick Cozzi and Christophe Riccio

Performance Testing in Virtualized Environments. Emily Apsey Product Engineer

1. INTRODUCTION Graphics 2

Consolidated Visualization of Enormous 3D Scan Point Clouds with Scanopy

Step 2: Paint Your Model

Introduction to GPGPU. Tiziano Diamanti

GPU Architecture. Michael Doggett ATI

GPUs Under the Hood. Prof. Aaron Lanterman School of Electrical and Computer Engineering Georgia Institute of Technology

ACE: After Effects CC

OpenEXR Image Viewing Software

CS5460: Operating Systems

CLOUD GAMING WITH NVIDIA GRID TECHNOLOGIES Franck DIARD, Ph.D., SW Chief Software Architect GDC 2014

GPU Christmas Tree Rendering. Evan Hart

INTRODUCTION TO RENDERING TECHNIQUES

NVFX : A NEW SCENE AND MATERIAL EFFECT FRAMEWORK FOR OPENGL AND DIRECTX. TRISTAN LORACH Senior Devtech Engineer SIGGRAPH 2013

Developer Tools. Tim Purcell NVIDIA

CSE 564: Visualization. GPU Programming (First Steps) GPU Generations. Klaus Mueller. Computer Science Department Stony Brook University

2: Introducing image synthesis. Some orientation how did we get here? Graphics system architecture Overview of OpenGL / GLU / GLUT

Writing Applications for the GPU Using the RapidMind Development Platform

ArcGIS Pro: Virtualizing in Citrix XenApp and XenDesktop. Emily Apsey Performance Engineer

Midgard GPU Architecture. October 2014

Outline. srgb DX9, DX10, XBox 360. Tone Mapping. Motion Blur

How To Teach Computer Graphics

Using process address space on the GPU

Connecting Software. CB Mobile CRM Windows Phone 8. User Manual

Silverlight for Windows Embedded Graphics and Rendering Pipeline 1

Introduction to Computer Graphics

Catalyst Software Suite Version 9.2 Release Notes

Real-Time Realistic Rendering. Michael Doggett Docent Department of Computer Science Lund university

Video Conferencing System Requirements

How To Manage Large Texture Images In A Clipmap

Computer Graphics on Mobile Devices VL SS ECTS

AGENDA. Overview GPU Video Encoding NVIDIA Video Encoding Capabilities. Software API Performance & Quality. Kepler vs Maxwell GPU capabilities Roadmap

Interactive Level-Set Deformation On the GPU

3D Computer Games History and Technology

Fundamentals of Computer Graphics

High Dynamic Range and other Fun Shader Tricks. Simon Green

Web Based 3D Visualization for COMSOL Multiphysics

Path Tracing Overview

Graphics Cards and Graphics Processing Units. Ben Johnstone Russ Martin November 15, 2011

Lecture 17: Virtual Memory II. Goals of virtual memory

Examples. Pac-Man, Frogger, Tempest, Joust,

Intel 865G Chipset Dynamic Video Memory Technology

Introduction GPU Hardware GPU Computing Today GPU Computing Example Outlook Summary. GPU Computing. Numerical Simulation - from Models to Software

NetVu. App for Android TM. Installation & Usage Guide

1. Definition of the project. 2. Initial version (simplified texture) 3. Second version (full textures) 5. Modelling and inserting 3D objects

Image Processing & Video Algorithms with CUDA

EView/400i Management Pack for Systems Center Operations Manager (SCOM)

Modern Graphics Engine Design. Sim Dietrich NVIDIA Corporation

GPU Renderfarm with Integrated Asset Management & Production System (AMPS)

HIGH-PERFORMANCE GPU VIDEO ENCODING ABHIJIT PATAIT SR. MANAGER, NVIDIA

GRID SDK FAQ. PG January Frequently Asked Questions

Course Overview. CSCI 480 Computer Graphics Lecture 1. Administrative Issues Modeling Animation Rendering OpenGL Programming [Angel Ch.

Windows Presentation Foundation: What, Why and When

The Evolution of Computer Graphics. SVP, Content & Technology, NVIDIA

Introduction to Computer Graphics. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

Visualization and Feature Extraction, FLOW Spring School 2016 Prof. Dr. Tino Weinkauf. Flow Visualization. Image-Based Methods (integration-based)

Transcription:

Real Virtual Texturing Taking Advantage of DirectX11.2 Tiled Resources Cem Cebenoyan Developer Technology, NVIDIA

Overview Background API Overview Example Walkthrough Sparse shadow maps

Background Virtual texturing techniques useful eg Megatexture Suffer from a number of problems Difficulty with filtering Needs borders Performance problems

Enter Native HW Support But GPUs have had virtual memory for years! We can leverage that directly to support tiled / virtual GPU resources

Tiled Resources Subdivide texture into a grid of tiles, allow some tiles to be missing No physical memory is allocated for missing tiles Applications control tile residency Can map and unmap tiles at run-time Multiple concurrent mappings Implemented using virtual memory subsystem Tiles correspond to VM pages

DirectX 11.2 Tiled Resources Looks like virtual memory: Virtual Texture Page Table Physical Memory A B A null B 0 0 1 C D C 2 D 1 2 3

Tiled Resources In Practice Virtual texture is a texture or buffer with D3D11_RESOURCE_MISC_TILED flag Virtual Texture Page Table Physical Memory A B A null B 0 0 1 C D C 2 D 1 2 3 In D3D: Tiled Resource (Texture2D or Buffer)

Tiled Resources In Practice Page table mappings are managed using UpdateTileMappings(). Virtual Texture Page Table Physical Memory A B A null B 0 0 1 C D C 2 D 1 2 3 In D3D: Tile Mappings

Tiled Resources In Practice Physical memory is the Tile Pool, a buffer with D3D11_BUFFER_MISC_TILE_POOL Virtual Texture Page Table Physical Memory A B A null B 0 0 1 C D C 2 D 1 2 3 In D3D: Tile Pool

Checking Availability CheckFeatureSupport() D3D11_FEATURE_D3D11_OPTIONS1 field TiledResourcesTier subfield NOT_SUPPORTED, TIER_1, or TIER_2

TIER_1 Tiled Resource and Tile Pool creation supported Accessing (r/w) NULL mapped tiles has undefined behavior Up to the user to define default tile and point all unmapped tile mappings to it Available on all AMD and NVIDIA hardware from the past few years

TIER_2 Relaxes some restrictions Accessing NULL mapped tiles now defined to return zero Writes to NULL mapped discarded Sample instructions for LOD clamp and getting feedback supported Available on newest and future hardware

TIER_1 vs. TIER_2 Tiled Resources Tile Pool LOD clamp Sample instruction Feedback Sample instruction NULL mapped behavior Supported on all current hw? TIER 1 x x undefined TIER 2 Zero x In general, almost all algorithms can be mapped to both tiers For example, LOD clamp can be approximated with explicit LOD and gather4 Tier 2 generally just an optimization

Other API features ResizeTilePool() Non-destructive TiledResourceBarrier() Virtual RT Handle this case: C Virtual Texture Page Table Physical Memory A B D A null B 0 C 2 D 0 0 1 2 3

Plus / Minus over SW Solutions Plusses All filtering modes just work No borders necessary Fast (virtual->physical translation in hw) Minuses HW and OS limitations But note TIER1 is supported by a ton of hw

Tile Shapes Tile size is fixed in bytes, not texels Texture format determines tile shape in texels Address mapping designed to keep tiles roughly square GPU pages are 64KB Implications for residency granularity Texel format Bytes per texel Tile shape for 64KB pages, texels RGBA8 4 128 x 128 RGBA16F 8 128 x 64 DXT1 0.5 512 x 256

Sparse Shadowmaps Ubiquitous shadow rendering technique Used in virtually every game Major problem: mismatch in sampling rates between image space and light space Source of most aliasing problems

Existing Solutions Existing solutions Creative transformations of the shadow map (PSM, TSM) Divide-and-Conquer (CSM) Exotic: resolution-matched shadowmaps, irregular Z-buffer

Sparse Shadowmaps Tiled texture support allows defining sparsely populated textures Texture residency is controlled per-tile Can view mip-mapped sparse texture as a variable-resolution representation Tiles missing at some level implies the data is presented at coarser LODs Provides finer-grained resolution control for shadow mapping

Sparse Shadow Maps Render the shadow map with non-uniform resolution Resolution allocated dynamically, depending on the current frame needs Shadow map represented by sparsely populated MIPchain Closer to the light Low resolution shadow Further from the light High resolution shadow

Sparse ShadowMaps Demo!

Algorithm Overview 1. Render pre-pass, determining shadow map LOD at each pixel E.g. a separate channel in the G-buffer may be used to store the LOD 2. Build the min LOD map in shadow map space Project screen-space per-pixel LODs to light space, compute min LOD per-tile 3. Create a sorted list of tile allocation requests Sorted from coarse to fine LODs 4. Remap tiles from the tile pool First N tiles from the request queue, N is the size of the pool 5. Render to the sparse shadow map Broadcast geometry to multiple MIP levels, writes to unmapped tiles ignored 6. Shade using the sparse shadow map Equivalent to other sparse texture usage

Algorithm Overview 1. Render pre-pass, determining shadow map LOD at each pixel E.g. a separate channel in the G-buffer may be used to store the LOD 2. Build the min LOD map in shadow map space Project screen-space per-pixel LODs to light space, compute min LOD per-tile 3. Create a sorted list of tile allocation requests Sorted from coarse to fine LODs 4. Remap tiles from the tile pool First N tiles from the request queue, N is the size of the pool 5. Render to the sparse shadow map Broadcast geometry to multiple MIP levels, writes to unmapped tiles ignored 6. Shade using the sparse shadow map Equivalent to other sparse texture usage

Required Shadowmap LOD Darker areas require higher shadowmap resolution

Algorithm Overview 1. Render pre-pass, determining shadow map LOD at each pixel E.g. a separate channel in the G-buffer may be used to store the LOD 2. Build the min LOD map in shadow map space Project screen-space per-pixel LODs to light space, compute min LOD per-tile 3. Create a sorted list of tile allocation requests Sorted from coarse to fine LODs 4. Remap tiles from the tile pool First N tiles from the request queue, N is the size of the pool 5. Render to the sparse shadow map Broadcast geometry to multiple MIP levels, writes to unmapped tiles ignored 6. Shade using the sparse shadow map Equivalent to other sparse texture usage

Sparse texture and min LOD map 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 1 0 0 1 1 2 2 2 2 0 0 0 1 2 2 2 2 0 0 0 0 3 3 3 3 0 0 0 1 3 3 3 3 0 0 1 1 3 3 3 3 0 0 1 1 3 3 3 3

LOD 1 LOD 2 LO D 0 LOD 0 LOD 3 Min LOD in the shadowmap space

Algorithm Overview 1. Render pre-pass, determining shadow map LOD at each pixel E.g. a separate channel in the G-buffer may be used to store the LOD 2. Build the min LOD map in shadow map space Project screen-space per-pixel LODs to light space, compute min LOD per-tile 3. Create a sorted list of tile allocation requests Sorted from coarse to fine LODs 4. Remap tiles from the tile pool First N tiles from the request queue, N is the size of the pool 5. Render to the sparse shadow map Broadcast geometry to multiple MIP levels, writes to unmapped tiles ignored 6. Shade using the sparse shadow map Equivalent to other sparse texture usage

Algorithm Overview 1. Render pre-pass, determining shadow map LOD at each pixel E.g. a separate channel in the G-buffer may be used to store the LOD 2. Build the min LOD map in shadow map space Project screen-space per-pixel LODs to light space, compute min LOD per-tile 3. Create a sorted list of tile allocation requests Sorted from coarse to fine LODs 4. Remap tiles from the tile pool First N tiles from the request queue, N is the size of the pool 5. Render to the sparse shadow map Broadcast geometry to multiple MIP levels, writes to unmapped tiles ignored 6. Shade using the sparse shadow map Equivalent to other sparse texture usage

Unallocated tiles are painted gray LOD 1 Camera LOD 2 LOD 0 LOD 3 Shadow map mips with allocated tiles

Rendering to the sparse shadowmap Geometry intersecting multiple tiles need to be replayed to appropriate LODs GS sends triangle to finest level that has tiles mapped, and all coarser levels Can use instanced GS for efficiency Writes to unmapped tiles are dropped 0 1 0 2 Need to render the triangle at LOD 0, 1, 2

Algorithm Overview 1. Render pre-pass, determining shadow map LOD at each pixel E.g. a separate channel in the G-buffer may be used to store the LOD 2. Build the min LOD map in shadow map space Project screen-space per-pixel LODs to light space, compute min LOD per-tile 3. Create a sorted list of tile allocation requests Sorted from coarse to fine LODs 4. Remap tiles from the tile pool First N tiles from the request queue, N is the size of the pool 5. Render to the sparse shadow map Broadcast geometry to multiple MIP levels, writes to unmapped tiles ignored 6. Shade using the sparse shadow map Equivalent to other sparse texture usage

Shading pass Use the shadowmap as any other sparse texture Use the min LOD map to determine the LOD Feed that into either LOD clamp or direct LOD texture sampling Can also do a speculative lookup and replay

Final lit scene

Questions? cem@nvidia.com For more info: Massive Virtual Textures for Games: Direct3D Tiled Resources, Matt Sandy, Microsoft http://channel9.msdn.com/events/build/2013/4-063 Special thanks to Alexey Panteleev and Yury Uralsky