Hi all, i have a simple fragment shader same as vk_ray_tracing_rayquery. I used also nvidia nsight to check that the tlas is correctly populated and it is ok. It seems that rayqueryproceedext is hitting anything even if origin direction and tlas are correct. Debug layer are quiet… any suggestion? Thanks!
That would require some more information to figure out what is going wrong.
For example a minimal and complete reproducer in failing state.
Maybe have a look through the Vulkan Raytracing tutorials and examples inside the NVIDIA nvpro-samples on github first: https://github.com/nvpro-samples
Thanks for your reply. I write my own sample following exactly what you are suggesting. What i don’t understand i why there is no hit if Nsight show me the tlas and blas populated correctly and rendered in the acceleration structure interface. I see it there and it is correct. The culling flags are 0xFF in the instance and in the rayQueryInitializeEXT, culling is disabled too.
Again, to be able to answer that you either need to provide a minimal and complete reproducer, or better use a working example and change that to your needs.
For example I neither know what your scene geometry is, nor what your ray setup is, nor in what program domain you’re calling that code excerpt.
Please work through that example and compare the rest of the application with your code.
Maybe there is something totally different which is not properly setup, like the scene geometry or shaders.
Solved! The problem was in the TLAS build command. I think that, even if Nsight show you the rendered TLAS, what you see is not the real acceleration structure but only the rendered geometry buffer of the BLAS, identified by the address contained in the instance structure, but this not guarantees that the the TLAS is correct.
What i was doing is create an empty TLAS with the BUILD flag only allocating an empty structure, then i updated the Instance buffer and then i called only an UPDATE (refit) on the TLAS previously created but this seems not the right way to create acceleration structure. Now i’m rebuilding the TLAS every frame and eveything is working fine. What i don’t understand is why Nvidia Nsight doesn’t catch this error because everything looks tha same. Thanks for suggestions!