Selective Ray Tracer Using Vulkan and CUDA

Overview

  • Period: September 2024 – December 2024
  • Type: Personal project
  • Objective: Reduce the ray-tracing cost of shadow generation while improving the visual quality of shadow maps.

The renderer performs ray tracing only around boundaries detected in the shadow-map result.

Implementation

  • Used interoperability between the Vulkan and CUDA APIs:
    • Vulkan handled graphics operations.
    • CUDA handled parallel image-processing operations.
  • Applied a parallel Sobel filter in CUDA to a shadow-map texture created by Vulkan.
  • Performed selective ray tracing only on regions identified as edges by the Sobel filter.

Challenge

  • The Sobel filter size and its boundary-detection characteristics prevented the renderer from producing shadows as clean as originally intended.
  • In the tested PC environment, the hybrid rendering approach does not outperform full ray tracing. This is mainly because the test system uses an RTX 4090, which provides very high ray tracing performance for general Whitted-style ray tracing workloads.

Result