gpu ray tracing hardware
**GPU Hardware Ray Tracing** is the **dedicated fixed-function hardware (NVIDIA RT Cores, AMD Ray Accelerators, Intel Ray Tracing Units) that accelerates the computationally intensive ray-scene intersection tests required for photorealistic rendering — traversing bounding volume hierarchies (BVH) and computing ray-triangle intersections at hundreds of billions of tests per second, enabling real-time ray tracing for reflections, shadows, ambient occlusion, and global illumination in games, film production, and scientific visualization**.
**Why Hardware Acceleration**
Ray tracing requires testing each ray against potentially millions of triangles. Software BVH traversal on shader cores achieves ~1-5 billion ray-box tests/second. RT Cores achieve 50-300 billion tests/second — a 10-100× speedup. This hardware acceleration transforms ray tracing from offline rendering (hours per frame) to real-time (16-33 ms per frame at 30-60 FPS).
**BVH (Bounding Volume Hierarchy)**
The acceleration structure that makes ray tracing tractable:
- **Construction**: Scene triangles are recursively partitioned into groups, each enclosed by an axis-aligned bounding box (AABB). The root AABB contains the entire scene; leaf nodes contain 1-8 triangles.
- **Traversal**: A ray tests against the root AABB. If it intersects, test both children. Recursively descend into intersected nodes, skip non-intersected subtrees. Average complexity: O(log N) triangle tests instead of O(N).
- **Quality vs. Build Time**: SAH (Surface Area Heuristic) BVH construction produces optimal traversal trees but is expensive to build. LBVH (Linear BVH) uses Morton codes for fast construction (suitable for dynamic scenes). TLAS/BLAS split: Bottom-Level AS (BLAS) per object (rebuilt rarely), Top-Level AS (TLAS) for scene arrangement (rebuilt every frame).
**RT Core Architecture (NVIDIA)**
- **BVH Traversal Unit**: Dedicated hardware that traverses the BVH tree, testing ray-AABB intersections at each node. One traversal step per clock — 2-3 AABB tests per cycle. Operates concurrently with shader execution on SM cores.
- **Ray-Triangle Intersection Unit**: Computes Möller-Trumbore ray-triangle intersection for leaf nodes. Reports hit distance, barycentric coordinates, and triangle ID.
- **Opacity Micro-Map (Hopper+)**: Hardware-accelerated alpha-test evaluation. Encodes per-micro-triangle opacity, allowing RT Cores to skip fully transparent triangles and classify semi-transparent regions — 2× speedup for foliage and particle effects.
**Ray Tracing Pipeline (DXR/Vulkan RT/OptiX)**
1. **Ray Generation Shader**: Launches rays (one per pixel for primary rays, additional for reflections/shadows).
2. **BVH Traversal** (hardware): RT Core traverses TLAS → BLAS hierarchy.
3. **Intersection Shader** (optional): Custom intersection test for non-triangle primitives (spheres, curves, SDF).
4. **Any-Hit Shader**: Called for each potential hit — used for alpha-test transparency. Can accept or reject the hit.
5. **Closest-Hit Shader**: Called for the nearest intersection. Computes shading (material, lighting, launches secondary rays).
6. **Miss Shader**: Called when no intersection found — returns environment/sky color.
**Performance Metrics**
NVIDIA RTX 4090: 191 billion RT Core TFLOPS equivalent, ~30-60 FPS in fully ray-traced scenes at 4K with DLSS. AMD RDNA 3 (RX 7900 XTX): significant improvement over RDNA 2 but still trails NVIDIA in pure RT throughput. Intel Arc provides competitive RT performance in its class.
GPU Hardware Ray Tracing is **the fixed-function acceleration that transformed photorealistic rendering from an offline computation to a real-time capability** — dedicated silicon that makes the physically-based lighting, reflections, and shadows of ray tracing achievable within the millisecond-per-frame budgets of interactive applications.