diff options
Diffstat (limited to 'intern/cycles/kernel/geom')
-rw-r--r-- | intern/cycles/kernel/geom/geom_motion_triangle.h | 18 | ||||
-rw-r--r-- | intern/cycles/kernel/geom/geom_triangle_intersect.h | 14 |
2 files changed, 16 insertions, 16 deletions
diff --git a/intern/cycles/kernel/geom/geom_motion_triangle.h b/intern/cycles/kernel/geom/geom_motion_triangle.h index 3cbe59aaece..538c332c63a 100644 --- a/intern/cycles/kernel/geom/geom_motion_triangle.h +++ b/intern/cycles/kernel/geom/geom_motion_triangle.h @@ -323,11 +323,11 @@ ccl_device_noinline void motion_triangle_shader_setup(KernelGlobals *kg, ShaderD * time and do a ray intersection with the resulting triangle */ ccl_device_inline bool motion_triangle_intersect(KernelGlobals *kg, Intersection *isect, - float3 P, float3 dir, float time, uint visibility, int object, int triAddr) + float3 P, float3 dir, float time, uint visibility, int object, int prim_addr) { /* primitive index for vertex location lookup */ - int prim = kernel_tex_fetch(__prim_index, triAddr); - int fobject = (object == OBJECT_NONE)? kernel_tex_fetch(__prim_object, triAddr): object; + int prim = kernel_tex_fetch(__prim_index, prim_addr); + int fobject = (object == OBJECT_NONE)? kernel_tex_fetch(__prim_object, prim_addr): object; /* get vertex locations for intersection */ float3 verts[3]; @@ -340,13 +340,13 @@ ccl_device_inline bool motion_triangle_intersect(KernelGlobals *kg, Intersection #ifdef __VISIBILITY_FLAG__ /* visibility flag test. we do it here under the assumption * that most triangles are culled by node flags */ - if(kernel_tex_fetch(__prim_visibility, triAddr) & visibility) + if(kernel_tex_fetch(__prim_visibility, prim_addr) & visibility) #endif { isect->t = t; isect->u = u; isect->v = v; - isect->prim = triAddr; + isect->prim = prim_addr; isect->object = object; isect->type = PRIMITIVE_MOTION_TRIANGLE; @@ -369,14 +369,14 @@ ccl_device_inline void motion_triangle_intersect_subsurface( float3 dir, float time, int object, - int triAddr, + int prim_addr, float tmax, uint *lcg_state, int max_hits) { /* primitive index for vertex location lookup */ - int prim = kernel_tex_fetch(__prim_index, triAddr); - int fobject = (object == OBJECT_NONE)? kernel_tex_fetch(__prim_object, triAddr): object; + int prim = kernel_tex_fetch(__prim_index, prim_addr); + int fobject = (object == OBJECT_NONE)? kernel_tex_fetch(__prim_object, prim_addr): object; /* get vertex locations for intersection */ float3 verts[3]; @@ -413,7 +413,7 @@ ccl_device_inline void motion_triangle_intersect_subsurface( isect->t = t; isect->u = u; isect->v = v; - isect->prim = triAddr; + isect->prim = prim_addr; isect->object = object; isect->type = PRIMITIVE_MOTION_TRIANGLE; diff --git a/intern/cycles/kernel/geom/geom_triangle_intersect.h b/intern/cycles/kernel/geom/geom_triangle_intersect.h index 8cd1b1a8897..4db121d94f4 100644 --- a/intern/cycles/kernel/geom/geom_triangle_intersect.h +++ b/intern/cycles/kernel/geom/geom_triangle_intersect.h @@ -108,7 +108,7 @@ ccl_device_inline bool triangle_intersect(KernelGlobals *kg, float3 P, uint visibility, int object, - int triAddr) + int prim_addr) { const int kx = isect_precalc->kx; const int ky = isect_precalc->ky; @@ -118,7 +118,7 @@ ccl_device_inline bool triangle_intersect(KernelGlobals *kg, const float Sz = isect_precalc->Sz; /* Calculate vertices relative to ray origin. */ - const uint tri_vindex = kernel_tex_fetch(__prim_tri_index, triAddr); + const uint tri_vindex = kernel_tex_fetch(__prim_tri_index, prim_addr); #if defined(__KERNEL_AVX2__) && defined(__KERNEL_SSE__) const avxf avxf_P(P.m128, P.m128); @@ -231,7 +231,7 @@ ccl_device_inline bool triangle_intersect(KernelGlobals *kg, #ifdef __VISIBILITY_FLAG__ /* visibility flag test. we do it here under the assumption * that most triangles are culled by node flags */ - if(kernel_tex_fetch(__prim_visibility, triAddr) & visibility) + if(kernel_tex_fetch(__prim_visibility, prim_addr) & visibility) #endif { #ifdef __KERNEL_CUDA__ @@ -241,7 +241,7 @@ ccl_device_inline bool triangle_intersect(KernelGlobals *kg, #endif /* Normalize U, V, W, and T. */ const float inv_det = 1.0f / det; - isect->prim = triAddr; + isect->prim = prim_addr; isect->object = object; isect->type = PRIMITIVE_TRIANGLE; isect->u = U * inv_det; @@ -264,7 +264,7 @@ ccl_device_inline void triangle_intersect_subsurface( SubsurfaceIntersection *ss_isect, float3 P, int object, - int triAddr, + int prim_addr, float tmax, uint *lcg_state, int max_hits) @@ -277,7 +277,7 @@ ccl_device_inline void triangle_intersect_subsurface( const float Sz = isect_precalc->Sz; /* Calculate vertices relative to ray origin. */ - const uint tri_vindex = kernel_tex_fetch(__prim_tri_index, triAddr); + const uint tri_vindex = kernel_tex_fetch(__prim_tri_index, prim_addr); const float4 tri_a = kernel_tex_fetch(__prim_tri_verts, tri_vindex+0), tri_b = kernel_tex_fetch(__prim_tri_verts, tri_vindex+1), tri_c = kernel_tex_fetch(__prim_tri_verts, tri_vindex+2); @@ -415,7 +415,7 @@ ccl_device_inline void triangle_intersect_subsurface( /* record intersection */ Intersection *isect = &ss_isect->hits[hit]; - isect->prim = triAddr; + isect->prim = prim_addr; isect->object = object; isect->type = PRIMITIVE_TRIANGLE; isect->u = U * inv_det; |