Path Tracing Optimization in Indiana Jones™: Shader Execution Reordering and Live State Reductions

Path Tracing Optimization in Indiana Jones™
1. Shader Execution Reordering
- Implemented for RayGen shaders to increase the average percentage of active threads per warp.
- SER was added as a shader permutation in the main path-tracing RayGen shader for GPUs supporting SER (GeForce RTX 40 and beyond).
- Coherence hint was used to improve performance.
2. Ray-Tracing Live-State Optimizations
- Identified GLSL variables causing RT live state bytes using Ray Tracing Live State tab in GPU Trace Profiler.
- Spilled ray-tracing live-state bytes were reduced or eliminated to optimize GPU performance.
- Optimization 1: Loop restructuring to reduce RT live state.
- Optimization 2: Using FP16 precision for specific variables.
- RT live-state optimizations reduced RT live state from 222 to 84 bytes, improving GPU time spent on a pass by 15% on an NVIDIA RTX 5080 GPU.
3. Performance Comparison
- Before optimizing RT live state, enabling SER made the pass 11% cheaper on a GeForce RTX 5080 GPU.
- After applying RT live state optimizations, a comparison of SER ON to SER OFF showed improved performance.
4. Additional Optimizations
- Additional RT live-state optimizations were implemented in the GLSL code for further performance enhancements.
- Changes in GLSL code optimized RGB throughput vector of the path tracer.
By implementing Shader Execution Reordering and optimizing Ray-Tracing Live-State, significant improvements in GPU performance were achieved for path tracing in Indiana Jones™. Additional optimizations further enhanced the performance and efficiency of the path tracer in the game.