Closed Novum closed 4 years ago
https://github.com/nvpro-samples/vk_raytracing_tutorial_KHR/blob/21fc6552372d40927b29904eabb25061874668ba/ray_tracing__advance/shaders/raytrace.rchit#L115
It seems like this should be using GLSL "nonuniform" because the threads can diverge and sample different textures?
This is safe to use. The txtId is unique when executing the closest hit shader and will not change or be affected by other threads.
https://github.com/nvpro-samples/vk_raytracing_tutorial_KHR/blob/21fc6552372d40927b29904eabb25061874668ba/ray_tracing__advance/shaders/raytrace.rchit#L115
It seems like this should be using GLSL "nonuniform" because the threads can diverge and sample different textures?