Ray tracing and frame generation improvements

In the upcoming major update, we are bringing you new ray tracing and other smaller features, along with additional graphical improvements!
Ray tracing on consoles
XBOX Series X, PlayStation 5 and PlayStation 5 Pro are getting a new ray tracing preset. These presets target 30 fps with dynamic resolution for players who want to experience the game with close to the maximum fidelity it can offer. We had made a great effort to reduce the memory requirement of ray tracing to fit into the memory budget of consoles and with some compromises we have succeeded.
- XBOX Series X, PS5: Ray traced sun shadows, ambient occlusion and reflections, but no dynamic objects in BVH for now
- PS5 Pro: Ray traced sun and dynamic shadows, ambient occlusion and reflections
XBOX Series S is the weakest of current generation consoles and unfortunately it doesn't have enough memory, even without soldiers getting added into BVH, so that console will not be getting a ray tracing preset.
The other end of the consoles is the PS5 Pro, its upgraded GPU compared to the base model allows for not only enabling ray traced dynamic lights too, but it also runs close to native 4k resolution most of the time.
Path Traced Global Illumination
We are releasing a new effect for ray tracing enthusiasts on PC: Path traced global illumination, PTGI for short. PTGI is meant to bring in physically correct ambient lighting to all opaque objects on the screen. It is path traced, meaning it recursively bounces rays around in the scene up to 3 times for indirect lighting, so for example a surface lit by the sun can also brighten up what's in front of it facing away from the sun.
This sort of light propagation is already included in our global illumination implementation, however that relies on signed distance field (SDF) for tracing, but that cannot properly capture all the details of the scene geometry. High quality GI also does screen space ray marching for distant pixels, but that's an even more limited source of information. PTGI sidesteps that issue by having access to the full scene in the BVH.
PTGI off / PTGI on
PTGI outputs a rather noisy signal because of the nature of indirect ambient lighting and shooting multiple rays per pixel per frame would slow down the feature significantly. But DLSS Ray Reconstruction has been supported in Enlisted for a while now, which can digest the noisy signal and output an image with a high quality ambient lighting. DLSS Ray Reconstruction is required to turn PTGI on.
Due to the recursive nature of path tracing this feature was always intended for high end GPUs, however there are some techniques to mitigate the performance cost:
1. The best way to reduce the cost of ray tracing is to trace less rays. With DLSS RR we can do checker board rendering for PTGI, which cuts down the performance cost by half, and to offset that the brightness loss of half the pixels being black, we can just multiply the output of the traced pixels by 2.
Full resolution tracing:

Half rate tracing with checker board pattern:

(The second picture looks white because values larger than 1 get clamped on the monitor.)
2. The other major performance saving in the same vein is Monte Carlo early ray termination. During the tracing we need to track the contribution of the ray. It starts at 1 and the more it bounces, the smaller it gets, since on every bounce only part of the light gets reflected by the object. We can rely on probability theory to speed this process up and still have the same expected outcome in the end. Let's make the survival chance the maximum of the per channel contribution of the ray. We generate a random number from 0 to 1, discard any rays where the random number is more than the survival chance and boost the surviving ray's contribution by 1/survival chance. Doing so we spend much less time tracing dim rays and lose no light, because merely doing fewer bounces just makes the image darker.
3. We have brought over the screen space resampling optimization from ray traced reflections. As the previous frame was already properly lit by GI, we can use the color from there, if the ray hit is on the screen. This not only saves calculating the lighting on the surface, but also allows us to terminate the path tracing there, since the previous frame was also illuminated recursively.
4. PTGI is a low frequency ambient light, so by its very nature you won't be able to see exact features of the traced scenes, unlike in ray traced reflections, where some surfaces are mirror like. This allows us to simplify the shading significantly, we can sample lower quality mip levels on materials and simplify the shading by only applying direct lighting.
5.Because PTGI is calculated on the full BVH, it inherently includes ambient occlusion. Ambient occlusion is generally a way to add back details that get lost in the GI implementations, but since PTGI just does it natively we don't need it. If PTGI is enabled, RTAO gets turned off, as indicated in the graphics settings too.
And of course effects get traced too, so flamethrowers contribute to lighting.
PTGI without FX / PTGI with FX
To keep effect tracing fast, PTGI only traces them on the first bounce and only accepts the first 4 hits. Using this optimization as inspiration, rough reflections could also be sped up. Puddles and such will still trace effects in full quality, however on very rough surfaces we can also just accept the first 4 hits, which significantly reduces the performance spike caused by effects with minimal visual difference.
Opacity micromaps
Opacity micromaps (OMM) is a new optimization feature that replaces the traditional any hit shaders.
Tracing alpha tested geometry can be particularly expensive, because whenever the ray tracing hardware finds a potential hit on an alpha tested object, it needs to call a programmable any hit shader, which may discard the hit, and then continue tracing. This becomes especially costly in forests, where the tree branches are made with alpha cutout textures. To limit the performance cost, we previously set a hard limit on the number of any hit shader invocations and after the limit was reached subsequent hits were accepted as opaque without performing further alpha tests. We empirically found the optimal value to be 10 invocations per ray, which results in a good compromise between visual quality and performance.
OMM offer a better solution. When building the bottom level acceleration structures, we also add extra data that subdivides the mesh triangles and maps each tiny triangle to a single bit, storing whether it's transparent or not. The lookup into this acceleration structure can be done without doing the slow any hit shader calls, so even with all the optimizations we made to the any hit shaders, OMM can make the ray traced passes significantly faster in forests and such.
PIX view of opacity micromaps, the colored tree trunk is not alpha tested, but the leaves are and all the black parts get discarded during tracing:

This is the debug view of a triangle of many for a tree. The inner yellow area is the alpha texture overlaid, any micro triangle it touches becomes opaque:

The great thing about it is that it also improves the visual quality. The 10 limit on any hit shader calls improved performance by a huge margin, but also resulted in false hits, which are gone entirely now. As you can see on the debug view, OMM gives a rather close approximation to the any hit shader implementation that samples the actual alpha textures.
For illustration here is an example of an alpha tested object that's nicely isolated.
Raster:

Any hit shader:

OMM:

With the limited overlapping of alpha tested surfaces, the any hit shader version matches the rasterization end goal more closely. However this is only really obvious in the debug view, it looks very similar when used for soft shadows and reflections.
But now let's look at the stress test of ray tracing: vegetation.
Raster:

Any hit shader:

OMM:

Bushes and trees are made up of many overlapping alpha tested triangles and here the any hit shader's optimization results in many false hits, making the centre of the bush a solid block.
And the memory usage is unchanged. One final optimization that we made to transparent objects is that we have a simplified buffer for vertex data we only use in any hit shaders. This allows for loading in less memory on the hot path, even though it has a memory overhead. We don't need such tricks with OMM, so we are more or less at the same memory footprint as before.
Any hit shader in scene / OMM in scene
As such, OMM is always enabled whenever the hardware supports it. The feature is currently only supported on NVIDIA RTX 40 and 50 series GPUs. Also, make sure to update your drivers to benefit from the new features.
Tracers in BVH
Now tracers also appear in the BVH, so you can see the reflections of bright tracers appear on water or glass.
Ray Tracing preset for PC
We have added a new Ray Tracing quality preset for PC. It's just a convenient way to switch to the game's highest recommended settings for players with ray tracing capable video cards. It enables everything that ultra does, plus ray traced shadows, ambient occlusion, reflection (opaque, glass and water) and additional clutter.
Retired features
We are dropping support for Temporal Hyper Resolution low quality and also AMD FidelityFX Super Resolution 1.0. With this, motion vectors will always be rendered on settings above bare minimum, which improves the rendering quality on all temporal effects, plus we are no longer required to make workarounds for the lack of motion vectors that eventually always introduced new artifacts.
Frame generation
With this update, we are adding AMD FSR frame generation support to the game, which requires DirectX 12.
DLSS frame generation is also getting an update. We have added support for 5x and 6x frame generation. We also added support for dynamic frame generation which automatically changes the frame generation ratio so that the resulting frame rate stays consistent. Requires an NVIDIA RTX 50 series card.
