Expand description
GPU ray tracing with f32 precision (CPU mock).
Provides BVH nodes, triangle/sphere/AABB intersection tests, full scene traversal, ambient occlusion sampling, and a simple orthographic renderer — all running on the CPU as a mock GPU backend.
Structs§
- BvhNode
- A BVH (bounding-volume hierarchy) node.
- GpuTriangle
- A triangle in GPU-friendly format.
- HitRecord
- Information about a ray–surface intersection.
- Ray
- A ray defined by an origin and a direction (f32 precision).
Functions§
- ambient_
occlusion_ sample - Estimate ambient occlusion at a hit point by sampling hemisphere directions.
- gpu_
render_ pixels - Render a scene with orthographic projection, returning one RGB pixel per sample.
- ray_
aabb_ intersect - Test ray–AABB intersection using the slab method.
- ray_
sphere_ intersect - Test ray–sphere intersection.
- ray_
triangle_ intersect - Test ray–triangle intersection using the Möller–Trumbore algorithm.
- trace_
ray - Find the closest triangle hit by
rayintriangles.