Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/kernel/geom/geom_motion_triangle_intersect.h
| Show All 28 Lines | |||||
| CCL_NAMESPACE_BEGIN | CCL_NAMESPACE_BEGIN | ||||
| /* Refine triangle intersection to more precise hit point. For rays that travel | /* Refine triangle intersection to more precise hit point. For rays that travel | ||||
| * far the precision is often not so good, this reintersects the primitive from | * far the precision is often not so good, this reintersects the primitive from | ||||
| * a closer distance. | * a closer distance. | ||||
| */ | */ | ||||
| ccl_device_inline float3 motion_triangle_refine(ccl_global const KernelGlobals *kg, | ccl_device_inline float3 motion_triangle_refine(KernelGlobals kg, | ||||
| ccl_private ShaderData *sd, | ccl_private ShaderData *sd, | ||||
| float3 P, | float3 P, | ||||
| float3 D, | float3 D, | ||||
| float t, | float t, | ||||
| const int isect_object, | const int isect_object, | ||||
| const int isect_prim, | const int isect_prim, | ||||
| float3 verts[3]) | float3 verts[3]) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | |||||
| #ifdef __BVH_LOCAL__ | #ifdef __BVH_LOCAL__ | ||||
| # if defined(__KERNEL_CUDA__) && (defined(i386) || defined(_M_IX86)) | # if defined(__KERNEL_CUDA__) && (defined(i386) || defined(_M_IX86)) | ||||
| ccl_device_noinline | ccl_device_noinline | ||||
| # else | # else | ||||
| ccl_device_inline | ccl_device_inline | ||||
| # endif | # endif | ||||
| float3 | float3 | ||||
| motion_triangle_refine_local(ccl_global const KernelGlobals *kg, | motion_triangle_refine_local(KernelGlobals kg, | ||||
| ccl_private ShaderData *sd, | ccl_private ShaderData *sd, | ||||
| float3 P, | float3 P, | ||||
| float3 D, | float3 D, | ||||
| float t, | float t, | ||||
| const int isect_object, | const int isect_object, | ||||
| const int isect_prim, | const int isect_prim, | ||||
| float3 verts[3]) | float3 verts[3]) | ||||
| { | { | ||||
| Show All 36 Lines | |||||
| # endif | # endif | ||||
| } | } | ||||
| #endif /* __BVH_LOCAL__ */ | #endif /* __BVH_LOCAL__ */ | ||||
| /* Ray intersection. We simply compute the vertex positions at the given ray | /* Ray intersection. We simply compute the vertex positions at the given ray | ||||
| * time and do a ray intersection with the resulting triangle. | * time and do a ray intersection with the resulting triangle. | ||||
| */ | */ | ||||
| ccl_device_inline bool motion_triangle_intersect(ccl_global const KernelGlobals *kg, | ccl_device_inline bool motion_triangle_intersect(KernelGlobals kg, | ||||
| ccl_private Intersection *isect, | ccl_private Intersection *isect, | ||||
| float3 P, | float3 P, | ||||
| float3 dir, | float3 dir, | ||||
| float tmax, | float tmax, | ||||
| float time, | float time, | ||||
| uint visibility, | uint visibility, | ||||
| int object, | int object, | ||||
| int prim_addr) | int prim_addr) | ||||
| Show All 40 Lines | |||||
| } | } | ||||
| /* Special ray intersection routines for local intersections. In that case we | /* Special ray intersection routines for local intersections. In that case we | ||||
| * only want to intersect with primitives in the same object, and if case of | * only want to intersect with primitives in the same object, and if case of | ||||
| * multiple hits we pick a single random primitive as the intersection point. | * multiple hits we pick a single random primitive as the intersection point. | ||||
| * Returns whether traversal should be stopped. | * Returns whether traversal should be stopped. | ||||
| */ | */ | ||||
| #ifdef __BVH_LOCAL__ | #ifdef __BVH_LOCAL__ | ||||
| ccl_device_inline bool motion_triangle_intersect_local(ccl_global const KernelGlobals *kg, | ccl_device_inline bool motion_triangle_intersect_local(KernelGlobals kg, | ||||
| ccl_private LocalIntersection *local_isect, | ccl_private LocalIntersection *local_isect, | ||||
| float3 P, | float3 P, | ||||
| float3 dir, | float3 dir, | ||||
| float time, | float time, | ||||
| int object, | int object, | ||||
| int local_object, | int local_object, | ||||
| int prim_addr, | int prim_addr, | ||||
| float tmax, | float tmax, | ||||
| ▲ Show 20 Lines • Show All 90 Lines • Show Last 20 Lines | |||||