nvpro-samples / vk_raytracing_tutorial_KHR

Ray tracing examples and tutorials using VK_KHR_ray_tracing
Apache License 2.0
1.36k stars 143 forks source link

updateBlas missing in animationObject #5

Closed nibeh closed 4 years ago

nibeh commented 4 years ago

Thanks for the nice tutorial codes! According to the documentation (https://nvpro-samples.github.io/vk_raytracing_tutorial_KHR/vkrt_tuto_animation.md.htm) we need to update the BLAS at the end of void HelloVulkan::animationObject(float time), however I cannot find the reference in the code. As animationInstances (which updates the blas(?)) is called before, we have a delay of one frame in the animation of the sphere - am I correct?

mklefrancois commented 4 years ago

Hi nibeh,

The documentation is fine, but the code has the m_rtBuilder.updateBlas(2); in the wrong function. It should be at the end of HelloVulkan::animationObject() instead of HelloVulkan::animationInstances()

Thanks for reporting, this should be corrected soon.

mklefrancois commented 4 years ago

Done in: https://github.com/nvpro-samples/vk_raytracing_tutorial_KHR/commit/e6976c0e65df43b58ce9bd641ea51cdcf6fb2129