logo资料库

Ray Tracing Gems-High-Quality and Real-Time Rendering with DXR.p....pdf

第1页 / 共622页
第2页 / 共622页
第3页 / 共622页
第4页 / 共622页
第5页 / 共622页
第6页 / 共622页
第7页 / 共622页
第8页 / 共622页
资料共622页,剩余部分请下载后查看
Table of Contents
Preface
Foreword
Contributors
Notation
Part I: Ray Tracing Basics
Chapter 1: Ray Tracing Terminology
1.1 Historical Notes
1.2 Definitions
Chapter 2: What is a Ray?
2.1 Mathematical Description of a Ray
2.2 Ray Intervals
2.3 Rays in DXR
2.4 Conclusion
Chapter 3: Introduction to DirectX Raytracing
3.1 Introduction
3.2 Overview
3.3 Getting Started
3.4 The DirectX Raytracing Pipeline
3.5 New HLSL Support for DirectX Raytracing
3.5.1 Launching a New Ray in HLSL
3.5.2 Controlling Ray Traversal in HLSL
3.5.3 Additional HLSL Intrinsics
3.6 A Simple HLSL Ray Tracing Example
3.7 Overview of Host Initialization for DirectX Raytracing
3.7.1 Insight into the Mental Model
3.8 Basic DXR Initialization and Setup
3.8.1 Geometry and Acceleration Structures
3.8.1.1 Bottom-Level Acceleration Structure
3.8.1.2 Top-Level Acceleration Structure
3.8.2 Root Signatures
3.8.3 Shader Compilation
3.9 Ray Tracing Pipeline State Objects
3.10 Shader Tables
3.11 Dispatching Rays
3.12 Digging Deeper and Additional Resources
3.13 Conclusion
Chapter 4: A Planetarium Dome Master Camera
4.1 Introduction
4.2 Methods
4.2.1 Computing Ray Directions from Viewport Coordinates
4.2.2 Circular Stereoscopic Projection
4.2.3 Depth of Field
4.2.4 Antialiasing
4.3 Planetarium Dome Master Projection Sample Code
Chapter 5: Computing Minima and Maxima of Subarrays
5.1 Motivation
5.2 Naive Full Table Lookup
5.3 The Sparse Table Method
5.4 The (Recursive) Range Tree Method
5.5 Iterative Range Tree Queries
5.6 Results
5.7 Summary
Part II: Intersections and Efficiency
Chapter 6: A Fast and Robust Method for Avoiding Self-Intersection
6.1 Introduction
6.2 Method
6.2.1 Calculating the Intersection Point on the Surface
6.2.2 Avoiding Self-Intersection
6.2.2.1 Exclusion Using the Primitive Identifier
6.2.2.2 Limiting the Ray Interval
6.2.2.3 Offsetting Along the Shading Normal or the Old Ray Direction
6.2.2.4 Adaptive Offsetting Along the Geometric Normal
6.3 Conclusion
Chapter 7: Precision Improvements for  Ray/Sphere Intersection
7.1 Basic Ray/Sphere Intersection
7.2 Floating-Point Precision Considerations
7.3 Related Resources
Chapter 8: Cool Patches: A Geometric Approach to Ray/Bilinear Patch Intersections
8.1 Introduction and Prior Art
8.1.1 Performance Measurements
8.1.2 Mesh Quadrangulation
8.2 GARP Details
8.3 Discussion of Results
8.4 Code
Chapter 9: Multi-Hit Ray Tracing in DXR
9.1 Introduction
9.2 Implementation
9.2.1 Naive Multi-Hit Traversal
9.2.2 Node-Culling Multi-Hit BVH Traversal
9.3 Results
9.3.1 Performance Measurements
9.3.1.1 Find First Intersection
9.3.1.2 Find All Intersections
9.3.1.3 Find Some Intersections
9.3.2 Discussion
9.4 Conclusions
Chapter 10: A Simple Load-Balancing Scheme with High Scaling Efficiency
10.1 Introduction
10.2 Requirements
10.3 Load Balancing
10.3.1 Naive Tiling
10.3.2 Task Size
10.3.3 Task Distribution
10.3.4 Image Assembly
10.4 Results
Part III: Reflections, Refractions, and Shadows
Chapter 11: Automatic Handling of Materials in Nested Volumes
11.1 Modeling Volumes
11.1.1 Unique Borders
11.1.2 Additional Air Gap
11.1.3 Overlapping Hulls
11.2 Algorithm
11.2.1 Implementation
11.3 Limitations
Chapter 12: A Microfacet-Based Shadowing Function to Solve the Bump Terminator Problem
12.1 Introduction
12.2 Previous Work
12.3 Method
12.3.1 The Normal Distribution
12.3.2 The Shadowing Function
12.4 Results
Chapter 13: Ray Traced Shadows: Maintaining Real-Time Frame Rates
13.1 Introduction
13.2 Related Work
13.3 Ray Traced Shadows
13.4 Adaptive Sampling
13.4.1 Temporal Reprojection
13.4.2 Identifying Penumbra Regions
13.4.3 Computing the Number of Samples
13.4.4 Sampling Mask
13.4.5 Computing Visibility Values
13.4.5.1 Temporal Filtering
13.4.5.2 Spatial Filtering
13.5 Implementation
13.5.1 Sample-Set Generation
13.5.2 Distance-Based Light Culling
13.5.3 Limiting the Total Sample Count
13.5.4 Forward Rendering Pipeline Integration
13.6 Results
13.6.1 Comparison with Shadow Mapping
13.6.2 Soft Shadows versus Hard Shadows
13.6.3 Limitations
13.7 Conclusion and Future Work
13.7.1 Future Work
Chapter 14: Ray-Guided Volumetric Water Caustics in Single Scattering Media with DXR
14.1 Introduction
14.2 Volumetric Lighting and Refracted Light
14.3 Algorithm
14.3.1 Compute Beam Compression Ratios
14.3.2 Render Caustics Map
14.3.3 Ray Trace Refracted Caustics Map and Accumulate Surface Caustics
14.3.4 Adaptively Tessellate the Triangles of the Water Surface
14.3.5 Build Triangular Beam Volumes
14.3.6 Render Volumetric Caustics Using Additive Blending
14.3.7 Combine Surface Caustics and Volumetric Caustics
14.4 Implementation Details
14.5 Results
14.6 Future Work
14.7 Demo
Part IV: Sampling
Chapter 15: On the Importance of Sampling
15.1 Introduction
15.2 Example: Ambient Occlusion
15.3 Understanding Variance
15.4 Direct Illumination
15.5 Conclusion
Chapter 16: Sampling Transformations Zoo
16.1 The Mechanics of Sampling
16.2 Introduction to Distributions
16.3 One-Dimensional Distributions
16.3.1 Linear
16.3.2 Tent
16.3.3 Normal Distribution
16.3.4 Sampling from a One-Dimensional Discrete Distribution
16.3.4.1 Just Once
16.3.4.2 Multiple Times
16.4 Two-Dimensional Distributions
16.4.1 Bilinear
16.4.2 A Distribution Given a Two-Dimensional Texture
16.4.2.1 Rejection Sampling
16.4.2.2 Multi-Dimensional Inversion Method
16.4.2.3 Hierarchical Transformation
16.5 Uniformly Sampling Surfaces
16.5.1 Disk
16.5.1.1 Polar Mapping
16.5.1.2 Concentric Mapping
16.5.2 Triangle
16.5.2.1 Warping
16.5.2.2 Flipping
16.5.3 Triangle Mesh
16.5.4 Sphere
16.5.4.1 Latitude-Longitude Mapping
16.5.4.2 Octahedral Concentric (Uniform) Map
16.6 Sampling Directions
16.6.1 Cosine-Weighted Hemisphere Oriented to the z-Axis
16.6.2 Cosine-Weighted Hemisphere Oriented to a Vector
16.6.3 Directions in a Cone
16.6.4 Phong Distribution
16.6.5 GGX Distribution
16.7 Volume Scattering
16.7.1 Distances in a Volume
16.7.1.1 Homogeneous Media
16.7.1.2 Inhomogeneous Media
16.7.2 Henyey-Greenstein Phase Function
16.8 Adding to the Zoo Collection
Chapter 17: Ignoring the Inconvenient When Tracing Rays
17.1 Introduction
17.2 Motivation
17.3 Clamping
17.4 Path Regularization
17.5 Conclusion
Chapter 18: Importance Sampling of Many Lights on the GPU
18.1 Introduction
18.2 Review of Previous Algorithms
18.2.1 Real-Time Light Culling
18.2.2 Many-Light Algorithms
18.2.3 Light Importance Sampling
18.3 Foundations
18.3.1 Lighting Integrals
18.3.2 Importance Sampling
18.3.2.1 Monte Carlo Method
18.3.2.2 Light Selection Importance Sampling
18.3.2.3 Light Source Sampling
18.3.3 Ray Tracing of Lights
18.4 Algorithm
18.4.1 Light Preprocessing
18.4.2 Acceleration Structure
18.4.2.1 Building the BVH
18.4.2.2 Light Orientation Cone
18.4.2.3 Defining the Split Plane
18.4.3 Light Importance Sampling
18.4.3.1 Probabilistic BVH Traversal
18.4.3.2 Random Number Usage
18.4.3.3 Sampling the Leaf Node
18.4.3.4 Sampling the Light Source
18.5 Results
18.5.1 Performance
18.5.1.1 Acceleration Structure Construction
18.5.1.2 Render Time per Frame
18.5.2 Image Quality
18.5.2.1 Build Options
18.5.2.2 Triangle Amount per Leaf Node
18.5.2.3 Sampling Methods
18.6 Conclusion
Part V: Denoising and Filtering
Chapter 19: Cinematic Rendering in UE4 with  Real-Time Ray Tracing and Denoising
19.1 Introduction
19.2 Integrating Ray Tracing in Unreal Engine 4
19.2.1 Phase 1: Experimental Integration
19.2.1.1 DirectX Raytracing Background on Acceleration Structures
19.2.1.2 Experimental Extensions to the UE4 RHI
19.2.1.3 Registering Geometry for a Variety of Engine Primitives
19.2.1.4 Updating the Ray Tracing Representation of the Scene
19.2.1.5 Iterating over All Objects
19.2.1.6 Customizing Shaders for Ray Traced Rendering
19.2.1.7 Batch Commit of Shader Parameters of Multiple Ray Types
19.2.1.8 Updating Instance Transformation
19.2.1.9 Building Acceleration Structures
19.2.1.10 Miss Shaders
19.2.2 Phase 2
19.2.2.1 Tier 1
19.2.2.2 Tier 2
19.2.2.3 Tier 3
19.3 Real-Time Ray Tracing and Denoising
19.3.1 Ray Traced Shadows
19.3.1.1 Lighting Evaluation
19.3.1.2 Shadow Denoising
19.3.2 Ray Traced Reflections
19.3.2.1 Simplified Reflection Shading
19.3.2.2 Denoising for Glossy Reflections
19.3.2.3 Specular Shading with Ray Traced Reflections
19.3.3 Ray Traced Diffuse Global Illumination
19.3.3.1 Ambient Occlusion
19.3.3.2 Indirect Diffuse from Light Maps
19.3.3.3 Real-Time Global Illumination
19.3.3.4 Denoising for Ambient Occlusion and Diffuse Global Illumination
19.3.4 Ray Traced Translucency
19.3.4.1 Ray Generation
19.4 Conclusions
Chapter 20: Texture Level of Detail Strategies for Real-Time Ray Tracing
20.1 Introduction
20.2 Background
20.3 Texture Level of Detail Algorithms
20.3.1 Mip Level 0 with Bilinear Filtering
20.3.2 Ray Differentials
20.3.2.1 Eye Ray Setup
20.3.2.2 Optimized Differential Barycentric Coordinate Computation
20.3.3 Ray Differentials with the G-Buffer
20.3.4 Ray Cones
20.3.4.1 Screen Space
20.3.4.2 Reflection
20.3.4.3 Pixel Spread Angle
20.3.4.4 Surface Spread Angle for Reflections
20.3.4.5 Generalization
20.4 Implementation
20.5 Comparison and Results
20.6 Code
Chapter 21: Simple Environment Map Filtering Using Ray Cones and Ray Differentials
21.1 Introduction
21.2 Ray Cones
21.3 Ray Differentials
21.4 Results
Chapter 22: Improving Temporal Antialiasing with Adaptive Ray Tracing
22.1 Introduction
22.2 Previous Temporal Antialiasing
22.3 A New Algorithm
22.3.1 Segmentation Strategy
22.3.1.1 Automatic Segmentation
22.3.1.2 UE4 Automatic Segmentation Implementation
22.3.1.3 Manual Segmentation
22.3.2 Sparse Ray Traced Supersampling
22.3.2.1 Subpixel Sample Distribution and Reuse
22.4 Early Results
22.4.1 Image Quality
22.4.2 Performance
22.5 Limitations
22.6 The Future of Real-Time Ray Traced Antialiasing
22.7 Conclusion
Part VI: Hybrid Approaches and Systems
Chapter 23: Interactive Light Map and Irradiance Volume Preview in Frostbite
23.1 Introduction
23.2 GI Solver Pipeline
23.2.1 Input and Output
23.2.1.1 Input
23.2.1.2 Output
23.2.2 GI Solver Pipeline Overview
23.2.3 Lighting Integration and Path Construction
23.2.4 Light Sources
23.2.5 Special Materials
23.2.6 Scheduling Texels
23.2.7 Performance Budgeting
23.2.8 Post-Process
23.3 Acceleration Techniques
23.3.1 View Prioritization
23.3.2 Light Acceleration Structure
23.3.3 Irradiance Caching
23.3.3.1 Direct Irradiance Cache Light Maps
23.3.3.2 Cache Update Process
23.3.3.3 Future Improvements
23.4 Live Update
23.4.1 Lighting Artist Workflow in Production
23.4.2 Scene Manipulation and Data Invalidation
23.5 Performance and Hardware
23.5.1 Method
23.5.2 Results
23.5.3 Hardware Setup
23.6 Conclusion
Chapter 24: Real-Time Global Illumination with Photon Mapping
24.1 Introduction
24.2 Photon Tracing
24.2.1 RSM-Based First Bounce
24.2.2 Following Photon Paths
24.2.3 DXR Implementation
24.3 Screen-Space Irradiance Estimation
24.3.1 Defining the Splatting Kernel
24.3.1.1 Uniform Scaling of the Kernel
24.3.1.2 Adjusting the Kernel’s Shape
24.3.2 Photon Splatting
24.3.2.1 Optimizing Splatting Using Reduced Resolution
24.4 Filtering
24.4.1 Temporal Filtering
24.4.2 Spatial Filtering
24.4.2.1 Variance Clipping of Detail Coefficients
24.4.3 Incorporating the Effect of Shading Normals
24.5 Results
24.6 Future Work
24.6.1 Optimizing Irradiance Distribution by Skipping Splatting
24.6.2 Adaptive Constants for Variance Clipping of the Detail Coefficients
Chapter 25: Hybrid Rendering for Real-Time Ray Tracing
25.1 Hybrid Rendering Pipeline Overview
25.2 Pipeline Breakdown
25.2.1 Shadows
25.2.2 Reflections
25.2.3 Ambient Occlusion
25.2.4 Transparency
25.2.5 Translucency
25.2.6 Global Illumination
25.3 Performance
25.4 Future
25.5 Code
Chapter 26: Deferred Hybrid Path Tracing
26.1 Overview
26.2 Hybrid Approach
26.3 BVH Traversal
26.3.1 Geometry Selection
26.3.2 Vertex Preprocessing
26.3.3 Shading
26.4 Diffuse Light Transport
26.4.1 Ray Heuristic
26.4.2 Last Frame’s Reprojection
26.4.3 Temporal and Spatial Filtering via Optimized Multi-Pass
26.5 Specular Light Transport
26.5.1 Temporal Accumulation
26.5.2 Reuse of Diffuse Lobe
26.5.3 Path Traced Indirect Lighting
26.5.4 Lobe Footprint Estimation
26.6 Transparency
26.7 Performance
26.7.1 Stereo Rendering for Virtual Reality
26.7.2 Discussion
Chapter 27: Interactive Ray Tracing Techniques for High-Fidelity Scientific Visualization
27.1 Introduction
27.2 Challenges Associated with Ray Tracing Large Scenes
27.2.1 Using the Right Geometric Primitive for the Job
27.2.2 Elimination of Redundancy, Compression, and Quantization
27.2.3 Considerations for Ray Tracing Acceleration Structures
27.3 Visualization Methods
27.3.1 Ambient Occlusion Lighting in Scientific Visualization
27.3.1.1 AO with Limited Occlusion Distance
27.3.1.2 Reducing Monte Carlo Sampling Noise
27.3.2 Edge-Enhanced Transparent Surfaces
27.3.3 Peeling Away Excess Transparent Surfaces
27.3.4 Edge Outlines
27.3.5 Clipping Planes and Spheres
27.4 Closing Thoughts
Part VII: Global Illumination
Chapter 28: Ray Tracing Inhomogeneous Volumes
28.1 Light Transport in Volumes
28.2 Woodcock Tracking
28.3 Example: A Simple Volume Path Tracer
28.4 Further Reading
Chapter 29: Efficient Particle Volume Splatting in a Ray Tracer
29.1 Motivation
29.2 Algorithm
29.3 Implementation
29.3.1 Ray Generation Program
29.3.2 Intersection and Any-Hit Programs
29.3.3 Sorting and Optimizations
29.4 Results
29.5 Summary
Chapter 30: Caustics Using Screen-Space Photon Mapping
30.1 Introduction
30.2 Overview
30.3 Implementation
30.3.1 Photon Emission and Photon Tracing
30.3.1.1 Photon Emission
30.3.1.2 Photon Tracing
30.3.1.3 Storing Photons
30.3.2 Photon Gathering
30.3.3 Lighting
30.4 Results
30.4.1 Limitations and Future Works
30.4.2 Transparent Objects in the Depth Buffer
30.4.3 Practical Usage
30.5 Code
Chapter 31: Variance Reduction via Footprint Estimation in the Presence of Path Reuse
31.1 Introduction
31.2 Why Assuming Full Reuse Causes a Broken MIS Weight
31.3 The Effective Reuse Factor
31.3.1 An Approximate Solution
31.3.2 Estimating the Footprint
31.4 Implementation Impacts
31.4.1 Performance Consequences
31.5 Results
Chapter 32: Accurate Real-Time Specular Reflections with Radiance Caching
32.1 Introduction
32.2 Previous Work
32.2.1 Planar Reflections
32.2.2 Screen-Space Reflections
32.2.3 Image-Based Lighting
32.2.4 Hybrid Approaches
32.2.5 Miscellaneous
32.3 Algorithm
32.3.1 Radiance Cache
32.3.1.1 Rendering
32.3.1.2 Lighting
32.3.2 Ray Tracing
32.3.2.1 Sampling the Specular BRDF
32.3.2.2 Ray Generation and Hit Storage
32.3.3 Radiance Computation for Rays
32.3.3.1 Sampling the Radiance Cache and Screen-Space Illumination
32.3.3.2 Shading Cache-Missed Rays
32.4 Spatiotemporal Filtering
32.4.1 Spatial Filtering
32.4.1.1 Edge-Stopping Weight
32.4.1.2 Roughness Weight
32.4.1.3 Reflection-Direction Weight
32.4.1.4 Ray-Length Weight
32.4.2 Temporal Filtering
32.4.3 Reflection Motion Vectors
32.4.3.1 Understanding the Problem
32.4.3.2 Direct Solution
32.4.3.3 Geometrical Optics Approach
32.4.3.4 Obtaining Optical Parameters
32.4.3.5 Velocity Transformation for Dynamic Objects
32.5 Results
32.5.1 Performance
32.5.2 Quality
32.6 Conclusion
32.7 Future Work
RAY TRACING GEMS HIGHQUALITY AND REALTIME RENDERING WITH DXR AND OTHER APIS EDITED BY ERIC HAINES TOMAS AKENINEMÖLLER SECTION EDITORS ALEXANDER KELLER MORGAN MCGUIRE JACOB MUNKBERG MATT PHARR PETER SHIRLEY INGO WALD CHRIS WYMAN
Ray Tracing Gems High-Quality and Real-Time Rendering with DXR and Other APIs Edited by Eric Haines and Tomas Akenine-Möller Section Editors  Alexander Keller Morgan McGuire Jacob Munkberg Matt Pharr Peter Shirley Ingo Wald Chris Wyman
Ray Tracing Gems: High-Quality and Real-Time Rendering with DXR and Other APIs Edited by  Eric Haines Tomas Akenine-Möller Section Editors:  Alexander Keller Morgan McGuire Jacob Munkberg Matt Pharr Peter Shirley Ingo Wald Chris Wyman ISBN-13 (electronic): 978-1-4842-4427-2 ISBN-13 (pbk): 978-1-4842-4426-5 https://doi.org/10.1007/978-1-4842-4427-2 Library of Congress Control Number: 2019934207 Copyright © 2019 by NVIDIA Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights. While the advice and information in this book are believed to be true and accurate at the date of publication, neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or omissions that may be made. The publisher makes no warranty, express or implied, with respect to the material contained herein. Open Access This book is licensed under the terms of the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License (http://creativecommons. org/licenses/by-nc-nd/4.0/), which permits any noncommercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if you modified the licensed material. You do not have permission under this license to share adapted material derived from this book or parts of it. The images or other third party material in this book are included in the book's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the book's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. Managing Director, Apress Media LLC: Welmoed Spahr Acquisitions Editor: Natalie Pao Development Editor: James Markham Coordinating Editor: Jessica Vakili Cover image designed by Freepik (www.freepik.com) Distributed to the book trade worldwide by Springer Science+Business Media New York, 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@springer-sbm.com, or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation. For information on translations, please e-mail rights@apress.com, or visit www.apress.com/rights-permissions. Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook versions and licenses are also available for most titles. For more information, reference our Print and eBook Bulk Sales web page at www.apress.com/bulk-sales. Any source code or other supplementary material referenced by the author in this book is available to readers on GitHub via the book's product page, located at www.apress.com/9781484244265. For more detailed information, please visit www.apress.com/source-code. Printed on acid-free paper
Table of Contents Preface ��������������������������������������������������������������������������������������������������� xiii Foreword ������������������������������������������������������������������������������������������������� xv Contributors ������������������������������������������������������������������������������������������� xxi Notation ������������������������������������������������������������������������������������������������� xliii PART I: Ray Tracing Basics ��������������������������������������������������������������� 5 Chapter 1: Ray Tracing Terminology ���������������������������������������������������������� 7 1.1 Historical Notes ......................................................................................7 1.2 Definitions ...............................................................................................8 Chapter 2: What is a Ray? ������������������������������������������������������������������������ 15 2.1 Mathematical Description of a Ray .......................................................15 2.2 Ray Intervals..........................................................................................17 2.3 Rays in DXR ...........................................................................................18 2.4 Conclusion .............................................................................................19 Chapter 3: Introduction to DirectX Raytracing ����������������������������������������� 21 3.1 Introduction ...........................................................................................21 3.2 Overview ................................................................................................21 3.3 Getting Started ......................................................................................22 3.4 The DirectX Raytracing Pipeline ...........................................................23 3.5 New HLSL Support for DirectX Raytracing ...........................................25 3.6 A Simple HLSL Ray Tracing Example ...................................................28 3.7 Overview of Host Initialization for DirectX Raytracing ..........................30 3.8 Basic DXR Initialization and Setup ........................................................31 iii
TABLE OF CONTENTS 3.9 Ray Tracing Pipeline State Objects .....................................................37 3.10 Shader Tables ......................................................................................41 3.11 Dispatching Rays .................................................................................43 3.12 Digging Deeper and Additional Resources .........................................44 3.13 Conclusion ...........................................................................................45 Chapter 4: A Planetarium Dome Master Camera ������������������������������������� 49 4.1 Introduction ...........................................................................................49 4.2 Methods .................................................................................................50 4.3 Planetarium Dome Master Projection Sample Code ...........................58 Chapter 5: Computing Minima and Maxima of Subarrays ������������������������ 61 5.1 Motivation ..............................................................................................61 5.2 Naive Full Table Lookup ........................................................................62 5.3 The Sparse Table Method ......................................................................62 5.4 The (Recursive) Range Tree Method .....................................................64 5.5 Iterative Range Tree Queries ................................................................66 5.6 Results ..................................................................................................69 5.7 Summary ...............................................................................................69 PART II: Intersections and Efficiency ���������������������������������������������� 75 Chapter 6: A Fast and Robust Method for Avoiding Self- Intersection ������ 77 6.1 Introduction ...........................................................................................77 6.2 Method ...................................................................................................78 6.3 Conclusion .............................................................................................84 Chapter 7: Precision Improvements for Ray/Sphere Intersection ���������� 87 7.1 Basic Ray/Sphere Intersection .............................................................87 7.2 Floating-Point Precision Considerations ..............................................89 7.3 Related Resources ................................................................................93 iv
TABLE OF CONTENTS Chapter 8: Cool Patches: A Geometric Approach to Ray/Bilinear Patch Intersections ������������������������������������������������������������� 95 8.1 Introduction and Prior Art .....................................................................95 8.2 GARP Details .......................................................................................100 8.3 Discussion of Results ..........................................................................102 8.4 Code.....................................................................................................105 Chapter 9: Multi-Hit Ray Tracing in DXR ������������������������������������������������ 111 9.1 Introduction .........................................................................................111 9.2 Implementation ...................................................................................113 9.3 Results ................................................................................................119 9.4 Conclusions .........................................................................................124 Chapter 10: A Simple Load-Balancing Scheme with High Scaling Efficiency �������������������������������������������������������������������������� 127 10.1 Introduction .......................................................................................127 10.2 Requirements ....................................................................................128 10.3 Load Balancing..................................................................................128 10.4 Results ..............................................................................................132 PART III: Reflections, Refractions, and Shadows �������������������������� 137 Chapter 11: Automatic Handling of Materials in Nested Volumes ���������� 139 11.1 Modeling Volumes .............................................................................139 11.2 Algorithm ..........................................................................................142 11.3 Limitations ........................................................................................146 Chapter 12: A Microfacet-Based Shadowing Function to Solve the Bump Terminator Problem ����������������������������������������������������� 149 12.1 Introduction .......................................................................................149 12.2 Previous Work ...................................................................................150 12.3 Method ...............................................................................................151 12.4 Results ..............................................................................................157 v
TABLE OF CONTENTS Chapter 13: Ray Traced Shadows: Maintaining Real-Time Frame Rates ������������������������������������������������������������������������������������������ 159 13.1 Introduction .......................................................................................159 13.2 Related Work .....................................................................................161 13.3 Ray Traced Shadows .........................................................................162 13.4 Adaptive Sampling ............................................................................164 13.5 Implementation .................................................................................171 13.6 Results ..............................................................................................175 13.7 Conclusion and Future Work ............................................................179 Chapter 14: Ray-Guided Volumetric Water Caustics in Single Scattering Media with DXR ���������������������������������������������������������� 183 14.1 Introduction .......................................................................................183 14.2 Volumetric Lighting and Refracted Light ..........................................186 14.3 Algorithm ..........................................................................................189 14.4 Implementation Details.....................................................................197 14.5 Results ..............................................................................................198 14.6 Future Work .......................................................................................200 14.7 Demo .................................................................................................200 PART IV: Sampling ������������������������������������������������������������������������ 205 Chapter 15: On the Importance of Sampling ������������������������������������������ 207 15.1 Introduction .......................................................................................207 15.2 Example: Ambient Occlusion ............................................................208 15.3 Understanding Variance ....................................................................213 15.4 Direct Illumination ............................................................................216 15.5 Conclusion .........................................................................................221 Chapter 16: Sampling Transformations Zoo ������������������������������������������ 223 16.1 The Mechanics of Sampling ..............................................................223 16.2 Introduction to Distributions .............................................................224 vi
TABLE OF CONTENTS 16.3 One-Dimensional Distributions ........................................................226 16.4 Two-Dimensional Distributions ........................................................230 16.5 Uniformly Sampling Surfaces ...........................................................234 16.6 Sampling Directions ..........................................................................239 16.7 Volume Scattering .............................................................................243 16.8 Adding to the Zoo Collection .............................................................244 Chapter 17: Ignoring the Inconvenient When Tracing Rays �������������������� 247 17.1 Introduction .......................................................................................247 17.2 Motivation ..........................................................................................247 17.3 Clamping ...........................................................................................250 17.4 Path Regularization...........................................................................251 17.5 Conclusion .........................................................................................252 Chapter 18: Importance Sampling of Many Lights on the GPU ��������������� 255 18.1 Introduction .......................................................................................255 18.2 Review of Previous Algorithms .........................................................257 18.3 Foundations .......................................................................................259 18.4 Algorithm ..........................................................................................265 18.5 Results ..............................................................................................271 18.6 Conclusion .........................................................................................280 PART V: Denoising and Filtering ��������������������������������������������������� 287 Chapter 19: Cinematic Rendering in UE4 with Real-Time Ray Tracing and Denoising ��������������������������������������������������������������������� 289 19.1 Introduction .......................................................................................289 19.2 Integrating Ray Tracing in Unreal Engine 4 ...................................... 290 19.3 Real-Time Ray Tracing and Denoising .............................................300 19.4 Conclusions .......................................................................................317 vii
分享到:
收藏