A Ray Tracing Implementation Performance Comparison between the CPU and the GPU

Detta är en Kandidat-uppsats från KTH/Datavetenskap

Författare: Robin Nordmark; Tim Olsén; [2022]

Nyckelord: ;

Sammanfattning: Ray tracing has gained recent popularity due to the advancement of computer hardware capabilities. The algorithm is used as a rendering technique for computer graphics by tracing rays of light to determine the color of a single pixel, thus simulating the physical behavior of light. This study explores the performance differences between the ray tracing algorithm on the CPU and the GPU processor units. By using CUDA, NVIDIA’s platform for parallel programming, general-purpose programming could be utilized on the GPU and C++ for the CPU counterpart. By rendering different numbers of spheres in varying resolutions, the performance difference could be measured on the two devices and put against each other. From the data gathered, we could conclude that the GPU, in most measurements, could finish its execution up to 1000–10000 times quicker than the CPU. However, there were instances, in lower resolutions, where the CPU would outperform the GPU. The performance on the GPU would in these lower resolutions be more unpredictable due to memory latency. The results of this study highlight the performance capabilities of the GPU, but also certain use cases on the CPU for lower pixel counts.

  HÄR KAN DU HÄMTA UPPSATSEN I FULLTEXT. (följ länken till nästa sida)