summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesh.h2
-rw-r--r--src/render.cu4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/mesh.h b/src/mesh.h
index 0622144..0afe1c9 100644
--- a/src/mesh.h
+++ b/src/mesh.h
@@ -12,7 +12,7 @@
less than `min_distance`, return true, else return false. */
__device__ bool
intersect_node(const float3 &origin, const float3 &direction,
- Geometry *geometry, const int &i, const float &min_distance)
+ Geometry *geometry, const int &i, float min_distance=-1.0f)
{
/* assigning these to local variables is faster for some reason */
float3 lower_bound = geometry->lower_bounds[i];
diff --git a/src/render.cu b/src/render.cu
index e5b4ac5..c1e8ea1 100644
--- a/src/render.cu
+++ b/src/render.cu
@@ -51,7 +51,7 @@ render(int nthreads, float3 *_origin, float3 *_direction, Geometry *geometry,
float distance;
if (n < 1 && !intersect_node(origin, direction, geometry,
- geometry->start_node, -1.0f)) {
+ geometry->start_node)) {
pixels[id] = 0;
return;
}
@@ -80,7 +80,7 @@ render(int nthreads, float3 *_origin, float3 *_direction, Geometry *geometry,
if (*node >= geometry->first_node) {
for (i=first_child; i < stop; i++) {
- if (intersect_node(origin, direction, geometry, i, -1.0f)) {
+ if (intersect_node(origin, direction, geometry, i)) {
*node = i;
node++;
}