Ray Tracing
A rendering technique that traces the path of light rays from the camera through each pixel, simulating reflection, refraction, and shadows with physical accuracy to produce photorealistic images.
Ray tracing traces light rays backward from a virtual camera through each pixel, computing color at intersection points. Turner Whitted published a paper on recursive ray tracing in 1980.
- Primary rays: Cast from camera through each pixel to find the nearest surface intersection, the starting point for lighting calculations
- Shadow rays: Cast from intersections toward light sources. Occluding objects indicate shadow. Soft shadows use multiple rays toward area light samples
- Reflection/refraction: Mirror surfaces trace reflection direction; transparent materials follow Snell's law. Recursion depth affects quality and cost
- Path tracing: Monte Carlo sampling traces random directions to compute physically based global illumination
NVIDIA RTX GPUs (2018+) include dedicated RT cores that accelerate ray tracing. Through DXR and Vulkan Ray Tracing, games implement hybrid rendering - rasterization for primary visibility plus ray tracing for reflections, shadows, and GI. Full path tracing is expensive and may be combined with DLSS/FSR upscaling.