Code comments

This commit is contained in:
Sascha Willems 2023-11-28 20:01:12 +01:00
parent b77417e7c8
commit a467d94159

View file

@ -1,5 +1,5 @@
/*
* Vulkan Example - Rendering a glTF model using hardware accelerated ray tracing example /for proper transparency, this sample does frame accumulation)
* Vulkan Example - Rendering a glTF model using hardware accelerated ray tracing example (for proper transparency, this sample does frame accumulation)
*
* Copyright (C) 2023 by Sascha Willems - www.saschawillems.de
*
@ -705,6 +705,10 @@ public:
{
uniformData.projInverse = glm::inverse(camera.matrices.perspective);
uniformData.viewInverse = glm::inverse(camera.matrices.view);
// This value is used to accumulate multiple frames into the finale picture
// It's required as ray tracing needs to do multiple passes for transparency
// In this sample we use noise offset by this frame index to shoot rays for transparency into different directions
// Once enough frames with random ray directions have been accumulated, it looks like proper transparency
uniformData.frame++;
memcpy(ubo.mapped, &uniformData, sizeof(uniformData));
}