2#ifndef _TINYPBRT_ACCELERATOR_H_
3#define _TINYPBRT_ACCELERATOR_H_
tpbrt_accelerator_bvh_split_method_t
Used to declare BVH split method.
Definition accelerator.h:33
tpbrt_accelerator_type_t
Used to declare accelerator type.
Definition accelerator.h:20
@ TPBRT_ACCELERATOR_BVH_SPLIT_METHOD_SAH
SAH split method. Denotes the surface area heuristic.
Definition accelerator.h:35
@ TPBRT_ACCELERATOR_BVH_SPLIT_METHOD_MIDDLE
Middle split method. Splits each node at its midpoint along the split axis.
Definition accelerator.h:37
@ TPBRT_ACCELERATOR_BVH_SPLIT_METHOD_MAX_NUM
Count of available BVH split methods.
Definition accelerator.h:43
@ TPBRT_ACCELERATOR_BVH_SPLIT_METHOD_HLBVH
HLBVH split method. Selects the HLBVH algorithm, which parallelizes well.
Definition accelerator.h:41
@ TPBRT_ACCELERATOR_BVH_SPLIT_METHOD_EQUAL
Equal split method. Splits the current group of primitives into two equal-sized sets.
Definition accelerator.h:39
@ TPBRT_ACCELERATOR_TYPE_KD_TREE
KD Tree acceleration.
Definition accelerator.h:24
@ TPBRT_ACCELERATOR_TYPE_BVH
BVH acceleration.
Definition accelerator.h:22
@ TPBRT_ACCELERATOR_TYPE_MAX_NUM
Count of available accelerator types.
Definition accelerator.h:26
float tpbrt_float_t
Float type.
Definition fwd.h:83
int32_t tpbrt_int_t
Int type.
Definition fwd.h:73
uint32_t tpbrt_uint_t
Unsigned int type.
Definition fwd.h:78
BVH accelerator parameters.
Definition accelerator.h:50
tpbrt_accelerator_bvh_split_method_t split_method
Method to use to partition the primitives when building the tree.
Definition accelerator.h:54
tpbrt_uint_t max_node_prims
Maximum number of primitives to allow in a node in the tree.
Definition accelerator.h:52
KD Tree accelerator parameters.
Definition accelerator.h:61
tpbrt_uint_t max_prims
Maximum number of primitives to store in kd-tree node. (Not a hard limit; more may be stored if the k...
Definition accelerator.h:69
tpbrt_int_t max_depth
Maximum depth of the kd-tree. If negative, the kd-tree chooses a maximum depth based on the number of...
Definition accelerator.h:71
tpbrt_float_t empty_bonus
"Bonus" factor for kd-tree nodes that represent empty space.
Definition accelerator.h:67
tpbrt_uint_t intersect_cost
The value of the cost function that estimates the expected cost of performing a ray-object intersecti...
Definition accelerator.h:63
tpbrt_uint_t traversal_cost
Estimated cost for traversing a ray through a kd-tree node.
Definition accelerator.h:65
PBRT Accelerator representation.
Definition accelerator.h:78
union tpbrt_accelerator_t::@0 as
Initialized value dependent on current type.
tpbrt_accelerator_type_t type
Accelerator type.
Definition accelerator.h:88
tpbrt_accelerator_bvh_params_t bvh
BVH accelerator parameters.
Definition accelerator.h:82
tpbrt_accelerator_kd_tree_params_t kd_tree
KD Tree accelerator parameters.
Definition accelerator.h:84