Blender V2.61 - r43446
|
Go to the source code of this file.
Defines | |
#define | ENTRYPOINT_SENTINEL 0x76543210 |
#define | BVH_STACK_SIZE 192 |
#define | BVH_NODE_SIZE 4 |
#define | TRI_NODE_SIZE 3 |
#define | NO_EXTENDED_PRECISION |
Functions | |
__device_inline float3 | bvh_inverse_direction (float3 dir) |
__device_inline void | bvh_instance_push (KernelGlobals *kg, int object, const Ray *ray, float3 *P, float3 *idir, float *t, const float tmax) |
__device_inline void | bvh_instance_pop (KernelGlobals *kg, int object, const Ray *ray, float3 *P, float3 *idir, float *t, const float tmax) |
__device_inline void | bvh_node_intersect (KernelGlobals *kg, bool *traverseChild0, bool *traverseChild1, bool *closestChild1, int *nodeAddr0, int *nodeAddr1, float3 P, float3 idir, float t, uint visibility, int nodeAddr) |
__device_inline void | bvh_triangle_intersect (KernelGlobals *kg, Intersection *isect, float3 P, float3 idir, uint visibility, int object, int triAddr) |
__device_inline bool | scene_intersect (KernelGlobals *kg, const Ray *ray, const uint visibility, 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 BVH_NODE_SIZE 4 |
Definition at line 33 of file kernel_bvh.h.
Referenced by bvh_node_intersect(), and scene_intersect().
#define BVH_STACK_SIZE 192 |
Definition at line 32 of file kernel_bvh.h.
Referenced by scene_intersect().
#define ENTRYPOINT_SENTINEL 0x76543210 |
Definition at line 30 of file kernel_bvh.h.
Referenced by scene_intersect().
#define NO_EXTENDED_PRECISION |
Definition at line 40 of file kernel_bvh.h.
Referenced by bvh_node_intersect().
#define TRI_NODE_SIZE 3 |
Definition at line 34 of file kernel_bvh.h.
Referenced by bvh_triangle_intersect(), and bvh_triangle_refine().
__device_inline void bvh_instance_pop | ( | KernelGlobals * | kg, |
int | object, | ||
const Ray * | ray, | ||
float3 * | P, | ||
float3 * | idir, | ||
float * | t, | ||
const float | tmax | ||
) |
Definition at line 75 of file kernel_bvh.h.
References bvh_inverse_direction(), Ray::D, FLT_MAX, len(), object_fetch_transform(), OBJECT_TRANSFORM, Ray::P, and transform_direction().
Referenced by scene_intersect().
__device_inline void bvh_instance_push | ( | KernelGlobals * | kg, |
int | object, | ||
const Ray * | ray, | ||
float3 * | P, | ||
float3 * | idir, | ||
float * | t, | ||
const float | tmax | ||
) |
Definition at line 58 of file kernel_bvh.h.
References bvh_inverse_direction(), Ray::D, FLT_MAX, len(), normalize_len(), object_fetch_transform(), OBJECT_INVERSE_TRANSFORM, Ray::P, transform(), and transform_direction().
Referenced by scene_intersect().
Definition at line 45 of file kernel_bvh.h.
References copysignf, fabsf, float3::x, float3::y, and float3::z.
Referenced by bvh_instance_pop(), bvh_instance_push(), and scene_intersect().
__device_inline void bvh_node_intersect | ( | KernelGlobals * | kg, |
bool * | traverseChild0, | ||
bool * | traverseChild1, | ||
bool * | closestChild1, | ||
int * | nodeAddr0, | ||
int * | nodeAddr1, | ||
float3 | P, | ||
float3 | idir, | ||
float | t, | ||
uint | visibility, | ||
int | nodeAddr | ||
) |
Definition at line 87 of file kernel_bvh.h.
References __float_as_int(), BVH_NODE_SIZE, kernel_tex_fetch, max, max4(), min, min4(), NO_EXTENDED_PRECISION, float4::w, float3::x, float4::x, float3::y, float4::y, float3::z, and float4::z.
Referenced by scene_intersect().
__device_inline void bvh_triangle_intersect | ( | KernelGlobals * | kg, |
Intersection * | isect, | ||
float3 | P, | ||
float3 | idir, | ||
uint | visibility, | ||
int | object, | ||
int | triAddr | ||
) |
Definition at line 135 of file kernel_bvh.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().
__device_inline float3 bvh_triangle_refine | ( | KernelGlobals * | kg, |
const Intersection * | isect, | ||
const Ray * | ray | ||
) |
Definition at line 344 of file kernel_bvh.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.
Referenced by shader_setup_from_ray().
Definition at line 299 of file kernel_bvh.h.
References __float_as_uint(), __uint_as_float(), credits_svn_gen::e, fabsf, float3::x, float3::y, and float3::z.
Referenced by direct_emission(), kernel_path_integrate(), scene_intersect(), and shadow_blocked().
__device_inline bool scene_intersect | ( | KernelGlobals * | kg, |
const Ray * | ray, | ||
const uint | visibility, | ||
Intersection * | isect | ||
) |
Definition at line 179 of file kernel_bvh.h.
References __float_as_int(), bvh_instance_pop(), bvh_instance_push(), bvh_inverse_direction(), bvh_node_intersect(), BVH_NODE_SIZE, BVH_STACK_SIZE, bvh_triangle_intersect(), Ray::D, ENTRYPOINT_SENTINEL, kernel_assert, kernel_data, kernel_tex_fetch, Intersection::object, P(), Ray::P, PATH_RAY_SHADOW_OPAQUE, Intersection::prim, Ray::t, Intersection::t, Intersection::u, Intersection::v, float4::x, and float4::y.
Referenced by kernel_path_integrate(), and shadow_blocked().