![]() |
Blender V2.61 - r43446
|
Go to the source code of this file.
Defines | |
#define | ENTRYPOINT_SENTINEL 0x76543210 |
#define | QBVH_STACK_SIZE 192 |
#define | QBVH_NODE_SIZE 8 |
#define | TRI_NODE_SIZE 3 |
Functions | |
__device_inline float3 | qbvh_inverse_direction (float3 dir) |
__device_inline void | qbvh_instance_push (KernelGlobals *kg, int object, const Ray *ray, float3 *P, float3 *idir, float *t, const float tmax) |
__device_inline void | qbvh_instance_pop (KernelGlobals *kg, int object, const Ray *ray, float3 *P, float3 *idir, float *t, const float tmax) |
__device_inline bool | qbvh_bb_intersect (float3 bmin, float3 bmax, float3 P, float3 idir, float t) |
__device_inline void | qbvh_node_intersect (KernelGlobals *kg, int *traverseChild, int nodeAddrChild[4], float3 P, float3 idir, float t, int nodeAddr) |
__device_inline void | qbvh_triangle_intersect (KernelGlobals *kg, Intersection *isect, float3 P, float3 idir, int object, int triAddr) |
__device_inline bool | scene_intersect (KernelGlobals *kg, const Ray *ray, const bool isshadowray, Intersection *isect) |
__device_inline float3 | ray_offset (float3 P, float3 Ng) |
__device_inline float3 | bvh_triangle_refine (KernelGlobals *kg, const Intersection *isect, const Ray *ray) |
#define ENTRYPOINT_SENTINEL 0x76543210 |
Definition at line 30 of file kernel_qbvh.h.
Referenced by scene_intersect().
#define QBVH_NODE_SIZE 8 |
Definition at line 33 of file kernel_qbvh.h.
Referenced by qbvh_node_intersect(), and scene_intersect().
#define QBVH_STACK_SIZE 192 |
Definition at line 32 of file kernel_qbvh.h.
Referenced by scene_intersect().
#define TRI_NODE_SIZE 3 |
Definition at line 34 of file kernel_qbvh.h.
Referenced by bvh_triangle_refine(), and qbvh_triangle_intersect().
__device_inline float3 bvh_triangle_refine | ( | KernelGlobals * | kg, |
const Intersection * | isect, | ||
const Ray * | ray | ||
) |
Definition at line 377 of file kernel_qbvh.h.
References Ray::D, D(), kernel_tex_fetch, normalize_len(), Intersection::object, object_fetch_transform(), OBJECT_INVERSE_TRANSFORM, OBJECT_TRANSFORM, P(), Ray::P, Intersection::prim, Intersection::t, transform(), transform_direction(), TRI_NODE_SIZE, float4::w, float3::x, float4::x, float3::y, float4::y, float3::z, and float4::z.
Definition at line 123 of file kernel_qbvh.h.
References max, max4(), min, min4(), float3::x, float3::y, and float3::z.
Referenced by qbvh_node_intersect().
__device_inline void qbvh_instance_pop | ( | KernelGlobals * | kg, |
int | object, | ||
const Ray * | ray, | ||
float3 * | P, | ||
float3 * | idir, | ||
float * | t, | ||
const float | tmax | ||
) |
Definition at line 66 of file kernel_qbvh.h.
References Ray::D, FLT_MAX, len(), object_fetch_transform(), OBJECT_TRANSFORM, Ray::P, qbvh_inverse_direction(), and transform_direction().
Referenced by scene_intersect().
__device_inline void qbvh_instance_push | ( | KernelGlobals * | kg, |
int | object, | ||
const Ray * | ray, | ||
float3 * | P, | ||
float3 * | idir, | ||
float * | t, | ||
const float | tmax | ||
) |
Definition at line 49 of file kernel_qbvh.h.
References Ray::D, FLT_MAX, len(), normalize_len(), object_fetch_transform(), OBJECT_INVERSE_TRANSFORM, Ray::P, qbvh_inverse_direction(), transform(), and transform_direction().
Referenced by scene_intersect().
Definition at line 36 of file kernel_qbvh.h.
References copysignf, fabsf, float3::x, float3::y, and float3::z.
Referenced by qbvh_instance_pop(), qbvh_instance_push(), and scene_intersect().
__device_inline void qbvh_node_intersect | ( | KernelGlobals * | kg, |
int * | traverseChild, | ||
int | nodeAddrChild[4], | ||
float3 | P, | ||
float3 | idir, | ||
float | t, | ||
int | nodeAddr | ||
) |
Definition at line 146 of file kernel_qbvh.h.
References __float_as_int(), kernel_tex_fetch, make_float3(), qbvh_bb_intersect(), QBVH_NODE_SIZE, float4::w, float4::x, float4::y, and float4::z.
Referenced by scene_intersect().
__device_inline void qbvh_triangle_intersect | ( | KernelGlobals * | kg, |
Intersection * | isect, | ||
float3 | P, | ||
float3 | idir, | ||
int | object, | ||
int | triAddr | ||
) |
Definition at line 181 of file kernel_qbvh.h.
References kernel_tex_fetch, Intersection::object, Intersection::prim, Intersection::t, TRI_NODE_SIZE, Intersection::u, Intersection::v, float4::w, float3::x, float4::x, float3::y, float4::y, float3::z, and float4::z.
Referenced by scene_intersect().
Definition at line 332 of file kernel_qbvh.h.
References __float_as_uint(), __uint_as_float(), credits_svn_gen::e, fabsf, float3::x, float3::y, and float3::z.
__device_inline bool scene_intersect | ( | KernelGlobals * | kg, |
const Ray * | ray, | ||
const bool | isshadowray, | ||
Intersection * | isect | ||
) |
Definition at line 217 of file kernel_qbvh.h.
References __float_as_int(), Ray::D, ENTRYPOINT_SENTINEL, kernel_assert, kernel_data, kernel_tex_fetch, Intersection::object, Ray::P, Intersection::prim, qbvh_instance_pop(), qbvh_instance_push(), qbvh_inverse_direction(), qbvh_node_intersect(), QBVH_NODE_SIZE, QBVH_STACK_SIZE, qbvh_triangle_intersect(), Ray::t, Intersection::t, Intersection::u, Intersection::v, float4::x, and float4::y.