diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-10-11 13:16:31 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-10-11 13:17:08 +0400 |
commit | abd38c00f1ed0305cf4d0735f567851862e34e08 (patch) | |
tree | 5d06a3aab2aa082e2c4205c5e89d74ff29affe69 /intern | |
parent | 815919b1fb79b60f82d72cd36ad2ba0d6fe86671 (diff) |
Cycles: set hit values in-order
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/kernel/geom/geom_bvh_traversal.h | 4 | ||||
-rw-r--r-- | intern/cycles/kernel/geom/geom_bvh_volume.h | 4 | ||||
-rw-r--r-- | intern/cycles/kernel/geom/geom_curve.h | 12 | ||||
-rw-r--r-- | intern/cycles/kernel/geom/geom_motion_triangle.h | 12 | ||||
-rw-r--r-- | intern/cycles/kernel/geom/geom_triangle.h | 12 |
5 files changed, 22 insertions, 22 deletions
diff --git a/intern/cycles/kernel/geom/geom_bvh_traversal.h b/intern/cycles/kernel/geom/geom_bvh_traversal.h index eed54a4d00d..114d30a479d 100644 --- a/intern/cycles/kernel/geom/geom_bvh_traversal.h +++ b/intern/cycles/kernel/geom/geom_bvh_traversal.h @@ -63,10 +63,10 @@ ccl_device bool BVH_FUNCTION_NAME #endif isect->t = ray->t; - isect->object = OBJECT_NONE; - isect->prim = PRIM_NONE; isect->u = 0.0f; isect->v = 0.0f; + isect->prim = PRIM_NONE; + isect->object = OBJECT_NONE; #if defined(__KERNEL_DEBUG__) isect->num_traversal_steps = 0; diff --git a/intern/cycles/kernel/geom/geom_bvh_volume.h b/intern/cycles/kernel/geom/geom_bvh_volume.h index aac0a18647a..9dd8d226f5b 100644 --- a/intern/cycles/kernel/geom/geom_bvh_volume.h +++ b/intern/cycles/kernel/geom/geom_bvh_volume.h @@ -61,10 +61,10 @@ ccl_device bool BVH_FUNCTION_NAME(KernelGlobals *kg, #endif isect->t = ray->t; - isect->object = OBJECT_NONE; - isect->prim = PRIM_NONE; isect->u = 0.0f; isect->v = 0.0f; + isect->prim = PRIM_NONE; + isect->object = OBJECT_NONE; #if defined(__KERNEL_SSE2__) const shuffle_swap_t shuf_identity = shuffle_swap_identity(); diff --git a/intern/cycles/kernel/geom/geom_curve.h b/intern/cycles/kernel/geom/geom_curve.h index c4e9e2ababe..b6d21c91916 100644 --- a/intern/cycles/kernel/geom/geom_curve.h +++ b/intern/cycles/kernel/geom/geom_curve.h @@ -600,12 +600,12 @@ ccl_device_inline bool bvh_cardinal_curve_intersect(KernelGlobals *kg, Intersect #endif { /* record intersection */ + isect->t = t; + isect->u = u; + isect->v = gd; isect->prim = curveAddr; isect->object = object; isect->type = type; - isect->u = u; - isect->v = gd; - isect->t = t; hit = true; } @@ -835,12 +835,12 @@ ccl_device_inline bool bvh_curve_intersect(KernelGlobals *kg, Intersection *isec #endif { /* record intersection */ + isect->t = t; + isect->u = z*invl; + isect->v = gd; isect->prim = curveAddr; isect->object = object; isect->type = type; - isect->u = z*invl; - isect->v = gd; - isect->t = t; return true; } diff --git a/intern/cycles/kernel/geom/geom_motion_triangle.h b/intern/cycles/kernel/geom/geom_motion_triangle.h index b275b89a8a4..3a4b20e61aa 100644 --- a/intern/cycles/kernel/geom/geom_motion_triangle.h +++ b/intern/cycles/kernel/geom/geom_motion_triangle.h @@ -336,12 +336,12 @@ ccl_device_inline bool motion_triangle_intersect(KernelGlobals *kg, Intersection if(kernel_tex_fetch(__prim_visibility, triAddr) & visibility) #endif { + isect->t = t; + isect->u = u; + isect->v = v; isect->prim = triAddr; isect->object = object; isect->type = PRIMITIVE_MOTION_TRIANGLE; - isect->u = u; - isect->v = v; - isect->t = t; return true; } @@ -388,12 +388,12 @@ ccl_device_inline void motion_triangle_intersect_subsurface(KernelGlobals *kg, I /* record intersection */ Intersection *isect = &isect_array[hit]; + isect->t = t; + isect->u = u; + isect->v = v; isect->prim = triAddr; isect->object = object; isect->type = PRIMITIVE_MOTION_TRIANGLE; - isect->u = u; - isect->v = v; - isect->t = t; } } #endif diff --git a/intern/cycles/kernel/geom/geom_triangle.h b/intern/cycles/kernel/geom/geom_triangle.h index 1b4c79c4e38..c08a82ee038 100644 --- a/intern/cycles/kernel/geom/geom_triangle.h +++ b/intern/cycles/kernel/geom/geom_triangle.h @@ -334,12 +334,12 @@ ccl_device_inline bool triangle_intersect(KernelGlobals *kg, Intersection *isect #endif { /* record intersection */ + isect->t = t; + isect->u = u; + isect->v = v; isect->prim = triAddr; isect->object = object; isect->type = PRIMITIVE_TRIANGLE; - isect->u = u; - isect->v = v; - isect->t = t; return true; } } @@ -397,12 +397,12 @@ ccl_device_inline void triangle_intersect_subsurface(KernelGlobals *kg, Intersec /* record intersection */ Intersection *isect = &isect_array[hit]; + isect->t = t; + isect->u = u; + isect->v = v; isect->prim = triAddr; isect->object = object; isect->type = PRIMITIVE_TRIANGLE; - isect->u = u; - isect->v = v; - isect->t = t; } } } |