1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/// Minimum parametric ray hit distance avoiding self-intersection.
pub const RT_RAY_T_MIN: f32 = 1e-4;
/// Maximum parametric ray distance representing an unobstructed ray.
pub const RT_RAY_T_MAX: f32 = 1e30;
/// Sentinel instance identifier marking analytic primitive and SDF intersections.
pub const RT_PRIMITIVE_INSTANCE_ID: u32 = u32MAX;
/// Number of Surface Area Heuristic (SAH) binning buckets evaluated per BVH axis.
pub const RT_SAH_BIN_COUNT: usize = 12;
/// Maximum triangle count stored in a single `Blas3D` leaf node.
pub const RT_BLAS_LEAF_MAX_TRIS: usize = 4;
/// Maximum instance count stored in a single `Tlas3D` leaf node.
pub const RT_TLAS_LEAF_MAX_INSTANCES: usize = 2;
/// Fixed zero-allocation iterative traversal stack depth for `Blas3D` and `Tlas3D`.
pub const RT_BVH_STACK_CAPACITY: usize = 64;
/// Numeric epsilon guarding parallel rays and degenerate determinants.
pub const RT_EPSILON: f32 = 1e-6;
/// Watertight barycentric boundary slack preventing hairline cracks between shared triangle edges.
pub const RT_TRIANGLE_EDGE_EPSILON: f32 = 1e-6;
/// Default maximum sphere-marching iterations for `SdfSphereTracer`.
pub const RT_SDF_DEFAULT_MAX_STEPS: u32 = 128;
/// Default surface hit threshold for `SdfSphereTracer`.
pub const RT_SDF_DEFAULT_EPSILON: f32 = 1e-4;
/// Default central-difference step used to compute analytic SDF gradients.
pub const RT_SDF_NORMAL_EPSILON: f32 = 5e-4;
/// Default maximum marching distance for `SdfSphereTracer`.
pub const RT_SDF_DEFAULT_MAX_DISTANCE: f32 = 100.0;
/// Maximum fixed stack depth for iterative CSG tree evaluation in `SdfSphereTracer`.
pub const RT_SDF_EVAL_STACK_CAPACITY: usize = 64;