Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void updateTLASLeaf(const uint indexOfLeafInTLAS) {
- uint indexOfLastUpdatedNodeInTLAS = ((1 << expOfTwo_maxModels) - 1) + indexOfLeafInTLAS;
- tlas.tree[indexOfLastUpdatedNodeInTLAS].aabb = tlasBLAS[indexOfLeafInTLAS].tree[0].aabb;
- /*tlas.tree[indexOfLastUpdatedNodeInTLAS].aabb = transformAABB(tlasBLAS[indexOfLeafInTLAS].tree[0].aabb, tlasBLAS[indexOfLeafInTLAS].ModelMatrix);
- while (!isRootNode(indexOfLastUpdatedNodeInTLAS)) {
- memoryBarrier();
- // Target the parent node for update
- indexOfLastUpdatedNodeInTLAS = parentNode(indexOfLastUpdatedNodeInTLAS);
- // Update the current node
- tlas.tree[indexOfLastUpdatedNodeInTLAS].aabb = joinAABBs(
- tlas.tree[leftNode(indexOfLastUpdatedNodeInTLAS)].aabb,
- tlas.tree[rightNode(indexOfLastUpdatedNodeInTLAS)].aabb);
- }*/
- }
Advertisement
Add Comment
Please, Sign In to add comment