A GPU Compute Framework for Real-Time Ray-Traced Acoustic Simulation in Unity - An analysis in Performance, Accuracy, and Validation

Abstract

This thesis evaluates the viability of GPU compute shader audio ray tracing for real-time spatial audio, comparing its performance and physical accuracy against a high-fidelity wave-based reference (FDTD). We present a custom compute shader framework built within the Unity engine that utilizes backward Monte Carlo ray tracing and dynamic Linear Bounding Volume Hierarchies (LBVH) to generate Room Impulse Responses (RIR) for each sound source present in a scene. The generated RIR is processed by a custom native C++ DSP plugin to handle real-time early reflections via convolution and late reverberation derived by the Schroeder equation. Testing in a complex architectural scene showed stable real-time performance at around 80-100 FPS while casting 16,000 rays per frame on an RTX 2060 hardware baseline. Accuracy evaluations showed that while the system can successfully model early reflections and directionality, it fails to physically sustain late reverberation tails. The acoustic energy decays faster than the wave-based ground truth due to ray budget constraints and compute shader control-flow divergence, which limit the amount of computation that can fit within the allowed time frame. We conclude that while GPU audio ray tracing is highly effective, it should be used primarily as a secondary tool to enhance the overall perceptual quality and spatial accuracy of the acoustic environment.

Description

Keywords

GPU Compute Shaders, Real-Time Acoustics, Geometrical Acoustics, Unity, Auralization

Citation

ISBN

Articles

Department

Defence location

Collections

Endorsement

Review

Supplemented By

Referenced By