What is ray tracing
Last updated: April 1, 2026
Key Facts
- Ray tracing calculates light physics by tracking individual light rays and their interactions with scene geometry, producing physically accurate images
- The technique generates photorealistic results by simulating reflections, refractions, shadows, and global illumination that traditional rasterization cannot achieve
- Ray tracing is computationally expensive, requiring thousands of calculations per pixel, making real-time performance historically impractical until recent hardware advances
- Modern GPUs with dedicated ray tracing cores (like NVIDIA RTX) and specialized software have enabled real-time ray tracing in video games and applications
- Ray tracing applications include film and animation rendering, architectural visualization, product design, scientific simulations, and increasingly, video games
How Ray Tracing Works
Ray tracing is a rendering algorithm that simulates light by tracing the path of rays (lines representing light) through a 3D environment. The process begins by casting rays from the camera through each pixel on the screen into the 3D scene. When a ray hits a surface, the algorithm calculates how light interacts with that surface—determining reflection, refraction, absorption, and transmission. The algorithm continues tracing rays recursively as they bounce between surfaces, building up a physically accurate representation of how light behaves in the scene. This approach produces images that look photorealistic because they obey the actual physics of light.
Advantages Over Traditional Rendering
Traditional real-time graphics use rasterization, which projects 3D geometry onto a 2D screen but cannot naturally handle complex light interactions. Ray tracing excels at producing accurate reflections (such as mirror-like surfaces), realistic shadows with soft edges, transparency and refraction effects (like glass and water), and global illumination (indirect lighting that bounces throughout a scene). These effects typically require separate approximation techniques in rasterization, while ray tracing produces them naturally as part of the light simulation. This makes ray tracing ideal for applications where visual accuracy is paramount.
Computational Cost
Ray tracing's primary limitation is computational expense. Each pixel in an image may require hundreds or thousands of ray calculations to achieve quality results, and a typical image contains millions of pixels. This intensive calculation historically made real-time ray tracing impractical—rendering a single frame could take hours or even days on high-end hardware. The computational burden is proportional to image resolution, ray complexity, and scene detail. Achieving 60 frames per second at 4K resolution with quality ray tracing requires enormous processing power, which is why real-time ray tracing remained in film and offline rendering until recently.
Real-Time Ray Tracing Technology
Recent advances have made real-time ray tracing feasible. NVIDIA's RTX graphics cards introduced dedicated ray tracing hardware cores that accelerate ray-surface intersection calculations by orders of magnitude. Software optimization techniques like denoising (reducing noise from fewer rays per pixel) and temporal techniques (reusing calculations from previous frames) further improve performance. Game developers now use ray tracing for some effects while combining it with traditional rasterization for performance. Current-generation gaming consoles and high-end GPUs can maintain playable frame rates with ray-traced reflections and shadows.
Applications
Film studios have used offline ray tracing for decades to create photorealistic visual effects and animated films, with rendering times measured in days per frame. Architects and product designers use ray tracing to visualize designs with accurate lighting and materials before construction or manufacture. Scientific researchers use ray tracing to simulate light behavior in optical systems and to create photorealistic scientific visualizations. Video game developers increasingly adopt ray tracing for next-generation games, using it selectively for reflections, shadows, and ambient lighting to enhance visual fidelity while maintaining playable frame rates.
Related Questions
How does ray tracing differ from rasterization?
Rasterization projects 3D geometry onto a 2D screen and colors pixels based on surface properties, requiring approximations for reflections and shadows. Ray tracing simulates actual light physics by tracing light paths, producing photorealistic results naturally but requiring vastly more computation.
Why is ray tracing computationally expensive?
Ray tracing requires calculating complex light interactions for each pixel, potentially tracing hundreds of rays per pixel recursively as they bounce through scenes. Each ray requires intersection testing with scene geometry, shading calculations, and material interactions, multiplied across millions of pixels.
What games use real-time ray tracing?
Modern games including Cyberpunk 2077, Minecraft with RTX, Control, and numerous recent AAA titles use real-time ray tracing. Current-generation consoles and high-end PCs support ray-traced effects like reflections and shadows, though developers often combine it with traditional rendering.
More What Is in Daily Life
Also in Daily Life
More "What Is" Questions
Trending on WhatAnswers
Browse by Topic
Browse by Question Type
Sources
- Wikipedia - Ray Tracing (Graphics)CC-BY-SA-4.0
- NVIDIA - Ray Tracing TechnologyProprietary
- Britannica - Ray TracingProprietary