diff options
author | Stan Seibert <stan@mtrr.org> | 2012-02-17 18:16:16 -0500 |
---|---|---|
committer | tlatorre <tlatorre@uchicago.edu> | 2021-05-09 08:42:38 -0700 |
commit | e2bf16de5d94a7b438e9c1af52f0bb4dc632b35f (patch) | |
tree | 1a3405ed6e1afbd135347ad85628c3af3fecb1fd | |
parent | e4e84309ea302ef7360e54f33715672a1d2b76b4 (diff) | |
download | chroma-e2bf16de5d94a7b438e9c1af52f0bb4dc632b35f.tar.gz chroma-e2bf16de5d94a7b438e9c1af52f0bb4dc632b35f.tar.bz2 chroma-e2bf16de5d94a7b438e9c1af52f0bb4dc632b35f.zip |
For paranoia reasons, add some padding on the low corner of the BVH leaf nodes.
-rw-r--r-- | chroma/cuda/bvh.cu | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/chroma/cuda/bvh.cu b/chroma/cuda/bvh.cu index 2080ab7..053eb2b 100644 --- a/chroma/cuda/bvh.cu +++ b/chroma/cuda/bvh.cu @@ -179,6 +179,9 @@ extern "C" // Quantize bounding corners and centroid uint3 q_lower = quantize3(lower, world_origin, world_scale); + if (q_lower.x > 0) q_lower.x--; + if (q_lower.y > 0) q_lower.y--; + if (q_lower.z > 0) q_lower.z--; uint3 q_upper = quantize3(upper, world_origin, world_scale) + 1; uint3 q_centroid = quantize3(centroid, world_origin, world_scale); |