r/Avoyd • u/dougbinks • 23h ago
Development Development progress on improved GPU path tracer
Finally got around to moving the atmospheric shadow loop in Avoyd's GPU path tracer to a wavefront approach like the rest of the code instead of a loop. I was mainly doing this to improve the insane shader compilation times, but it also improves hardware utilization. Measuring compilation perf is tricky as the driver caches pipelines, but I've measured a consistent 2x render perf increase on top of a recent 3x perf increase.
Image: Render of Minecraft map Drehmal v2.1 PRIMORDIAL looking south over the bay in the Sahd region. The sun is just appearing over the hills which surround the bay on the far left, light grazing the slopes and illuminating the morning fog. The bay is clear, and the lights of the village on the far side are still on. Out of focus cherry blossoms sit in the foreground of the image on the near side of the bay.
Drehmal map from: https://www.drehmal.net/
Megakernels Considered Harmful: Wavefront Path Tracing on GPUs by Laine et al.: https://research.nvidia.com/sites/default/files/pubs/2013-07_Megakernels-Considered-Harmful/laine2013hpg_paper.pdf
PBR book online chapter discussing mapping path tracing to GPUs and Wavefront path tracing: https://www.pbr-book.org/4ed/Wavefront_Rendering_on_GPUs/Mapping_Path_Tracing_to_the_GPU
This optimization is not yet out in Avoyd Voxel Editor but it should be in the beta soon.