ITADN

Special Case for Volume Rendering

#101Closedtay10r 创建于 2025-04-04
enhancement
T
tay10rcommented
This is a minor issue for a slightly contrived example, but when the boxes in the BVH are for volumes, not performing the bbox test has a non-negligible impact on performance and on the render itself. When there is only one box (for one volume) in the BVH, the bounding box test is skipped and the leaf function is called (which in my case, invokes the ray marching code). I think the neighborhood of this line of code is the relevant part: https://github.com/madmann91/bvh/blob/fbdc59615112d471409515cd2ab826fcc3100fd7/src/bvh/v2/bvh.h#L152 I guess I'm also not sure if I can rely on a bbox test being done for each primitive. In the use case of volume rendering, where each volume has a bounding box, would I be able to rely on the bounding box tests of this library before invoking the ray marching code? Or do I need to perform my own bbox tests for volumes
关闭于 2025-04-04 2 条评论