Ray tracing is a technique for rendering computer graphics that creates images by tracing the path of light rays through a scene. Light can interact with objects in the scene, reflecting off them and acquiring properties such as color.
Ray tracing simulates real-world lighting. The light we see is the result of photons emitted from an energy source, such as the sun. Photons bounce and scatter when they collide with objects. All you need is a mirror to see it in action. When light hits a mirror, it is reflected.
Ray tracing simulates this. The number of traced rays is minuscule compared to the real world, where millions of photons bounce across our field of view. Modern games trace between one and four rays per pixel. Still, it's enough to simulate the real world.
Tracing the path of a ray also allows it to interact with the game world. Light reflected from a red object may be affected by that color, casting a red glow nearby. Light can be scattered in different ways depending on the properties assigned to the object by game artists, allowing for realistic semi-reflective or rough surfaces.
Ray tracing is an important step forward in 3D graphics. It creates realistic images by simulating the path of light as it moves through the game. This allows lighting to interact with the environment even when the environment is invisible to the player. Ray tracing doesn't require specialized hardware to run, but it only works with graphics cards or game consoles that can accelerate ray tracing because it's very demanding.
Even if you understand the explanation, you may still be confused. There's reflection in games from the past, even those that are decades old. How is ray tracing different?
3D games of the past and most modern games use rasterization. Rasterization combines the 3D game world elements visible to the player into a 2D image. It only renders content that should be visible to the player, because any performance used to generate content that the player cannot see is wasted. However, this creates a problem.
Let's go back to the mirror example. The player's environment and player character are invisible to the player (at least in first-person games). With rasterization, the mirror has nothing to reflect.
Of course, mirrors exist in modern games too. They render the scene twice. One pass is from the player's perspective, while the other is from a different perspective. However, this doubles the performance required to render the scene.
Screen-space reflections are a technique in popular 3D game engines that use screen data to create reflections. This technique is ideal for reflective surfaces (such as water) that are at an angle to the player's perspective. However, if the reflected item moves off the screen, the reflected object disappears.
Ray tracing doesn't suffer from these problems because, unlike rasterization, it can be traced outside of the player's perspective.
Additionally, in games that allow light to interact with surfaces, ray tracing can show realistic color bleeding and semi-reflective surfaces that are difficult to rasterize.
Ray tracing is not a new idea. Computer scientists experimented with ray tracing in the early 1980s to create static images with realistic lighting, reflections and shadows. Unfortunately, it took them hours to render.
Video games require real-time ray tracing at 30 frames per second or higher. This is only possible with a graphics card designed to accelerate ray tracing.
Nvidia's RTX ray tracing relies on silicon called Tensor Cores. Tensor Core only exists in RTX graphics cards. Nvidia's GTX cards can render games using ray tracing because, as mentioned above, ray tracing doesn't require a dedicated chip. However, the performance is very poor compared to RTX cards. Some games, such as Minecraft with RTX Ray Tracing, require RTX graphics cards because of the specific way they enable ray tracing.
There is no specific brand of AMD card for accelerated ray tracing, nor is there a dedicated chip. Instead, they use hardware tweaks and software updates to get better results. Identifying AMD cards that accelerate ray tracing can be difficult, so pay attention to the details.
Sony's PlayStation 5 and Xbox Series X and S have graphics hardware from AMD that can accelerate ray tracing. However, it's up to the developer to enable it, and many games don't. One notable example is Cyberpunk 2077 , which supported RTX ray tracing on PC at launch, but not on next-gen consoles. The feature is promised for next-gen consoles in a future patch.