summaryrefslogtreecommitdiff
path: root/src/alpha.h
diff options
context:
space:
mode:
authorAnthony LaTorre <tlatorre9@gmail.com>2011-08-26 01:27:43 -0400
committerAnthony LaTorre <tlatorre9@gmail.com>2011-08-26 01:27:43 -0400
commit46f7f58dd6cf3c008e3ef0496f0ee60b52db6941 (patch)
treea1039414283669a2783f001e0c77ac09e5ba7baa /src/alpha.h
parente75eda8a637c01c34c71063b91a86845cc1c5beb (diff)
downloadchroma-46f7f58dd6cf3c008e3ef0496f0ee60b52db6941.tar.gz
chroma-46f7f58dd6cf3c008e3ef0496f0ee60b52db6941.tar.bz2
chroma-46f7f58dd6cf3c008e3ef0496f0ee60b52db6941.zip
no more 3d headache! 3d viewing angle changes depending on the distance to the object in the center of the screen.
Diffstat (limited to 'src/alpha.h')
-rw-r--r--src/alpha.h10
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;