Back to Wgpu

ray-aabb

examples/features/src/ray_aabb_compute/README.md

30.0.0485 B
Original Source

ray-aabb

This example ray-traces AABB geometry from an acceleration structure, then turns each hit into a sphere: the compute shader uses hardware ray queries for the AABBs, fits a sphere inside each box, and resolves it with ray-sphere intersection.

NOTE: The Metal backend does not support AABB intersections in ray queries yet, so this example will not work.

To Run

cargo run --bin wgpu-examples ray_aabb_compute

Screenshots