diff options
Diffstat (limited to 'src/alpha.h')
-rw-r--r-- | src/alpha.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/alpha.h b/src/alpha.h index 263fa1e..ac75834 100644 --- a/src/alpha.h +++ b/src/alpha.h @@ -10,8 +10,10 @@ #define ALPHA_DEPTH 10 -__device__ int get_color_alpha(const float3 &origin, const float3& direction, bool &hit, float &distance) +__device__ int get_color_alpha(const float3 &origin, const float3& direction) { + float distance; + if (!intersect_node(origin, direction, g_start_node, -1.0f)) return 0; @@ -95,13 +97,7 @@ __device__ int get_color_alpha(const float3 &origin, const float3& direction, bo while (node != head); if (n < 1) - { - hit = false; return 0; - } - - hit = true; - distance = distances[0]; float scale = 1.0f; float fr = 0.0f; |