Skip to main content

Module gpu_ray_tracing

Module gpu_ray_tracing 

Source
Expand description

GPU ray tracing (CPU mock implementation).

Provides BVH construction, ray-AABB intersection (slab method), ray-triangle intersection (Möller-Trumbore), and BVH traversal.

Structs§

Aabb
Axis-aligned bounding box (AABB).
BvhNode
A node in the bounding volume hierarchy.
HitRecord
Result of a ray-triangle intersection test.
Ray
A ray defined by an origin and a direction.
Triangle
A triangle defined by three vertices.

Functions§

batch_ray_cast
Cast multiple rays against a BVH and return the closest hit for each.
build_bvh
Build a BVH from a list of triangles using bottom-up SAH-lite construction.
ray_aabb_intersect
Test whether a ray intersects an AABB using the slab method.
ray_triangle_intersect
Test whether a ray intersects a triangle using the Möller-Trumbore algorithm.
traverse_bvh
Traverse the BVH to find the closest ray-triangle intersection.