Ray Tracing Gems : High-Quality and Real-Time Rendering with DXR and Other APIs.
Main Author: | |
---|---|
Other Authors: | |
Format: | eBook |
Language: | English |
Published: |
Berkeley, CA :
Apress L. P.,
2019.
|
Edition: | 1st ed. |
Subjects: | |
Online Access: | Click to View |
Table of Contents:
- Intro
- 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.