diff options
author | Anthony LaTorre <tlatorre9@gmail.com> | 2011-08-12 20:55:07 -0400 |
---|---|---|
committer | Anthony LaTorre <tlatorre9@gmail.com> | 2011-08-12 20:55:07 -0400 |
commit | 272c555f6b893a05f6d6a6439d519036e9379075 (patch) | |
tree | b14de78e915fd11fc037a9a415366a0a7ee4c45e /src/alpha.h | |
parent | 8328b6e53f51974afb4b22c8a84e4d0a99cf162b (diff) | |
download | chroma-272c555f6b893a05f6d6a6439d519036e9379075.tar.gz chroma-272c555f6b893a05f6d6a6439d519036e9379075.tar.bz2 chroma-272c555f6b893a05f6d6a6439d519036e9379075.zip |
do not check child nodes of a node at which the distance to the bounding box is further than a triangle the ray/photon has already intersected
Diffstat (limited to 'src/alpha.h')
-rw-r--r-- | src/alpha.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/alpha.h b/src/alpha.h index a9963eb..e4a3a40 100644 --- a/src/alpha.h +++ b/src/alpha.h @@ -57,7 +57,7 @@ __device__ int get_color_alpha(const float3 &origin, const float3& direction) float distance; - if (!intersect_node(origin, direction, g_start_node)) + if (!intersect_node(origin, direction, g_start_node, -1.0f)) return 0; unsigned int stack[STACK_SIZE]; @@ -85,7 +85,7 @@ __device__ int get_color_alpha(const float3 &origin, const float3& direction) { for (i=first_child; i < stop; i++) { - if (intersect_node(origin, direction, i)) + if (intersect_node(origin, direction, i, -1.0f)) { *node = i; node++; |