Skip to content

Commit

Permalink
Remove objects with transmission from TLAS
Browse files Browse the repository at this point in the history
We used to not trace them and now we do, but they don't have an alpha
tested texture (and they aren't currently rendered in the main pass!)
  • Loading branch information
zeux committed Dec 15, 2024
1 parent 2a329d8 commit 8863e1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/niagara.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ VkAccelerationStructureKHR buildTLAS(VkDevice device, Buffer& tlasBuffer, const
instance.instanceCustomIndex = i;
instance.mask = 1 << draw.postPass;
instance.flags = draw.postPass ? VK_GEOMETRY_INSTANCE_FORCE_NO_OPAQUE_BIT_KHR : VK_GEOMETRY_INSTANCE_FORCE_OPAQUE_BIT_KHR;
instance.accelerationStructureReference = blasAddresses[draw.meshIndex];
instance.accelerationStructureReference = draw.postPass <= 1 ? blasAddresses[draw.meshIndex] : 0;

memcpy(static_cast<VkAccelerationStructureInstanceKHR*>(instances.data) + i, &instance, sizeof(VkAccelerationStructureInstanceKHR));
}
Expand Down

0 comments on commit 8863e1b

Please sign in to comment.