Why: As more AAA games enter the mobile market, it’s crucial to have supporting technologies and tools that help create more realistic and immersive gaming experiences. Ray tracing is a computer-graphics technique that achieves this aim through generating realistic lighting and shadows. The challenge is that ray tracing techniques can use significant power and energy as shown in profiling via Arm Mobile Studio. However, using these techniques carefully through a series of initial tips and recommendations can mitigate any power or energy losses, while tuning-up the performance of your game.
How: The flagship Immortalis-G715 is Arm's first GPU to introduce hardware-based ray tracing support on mobile. The GPU is now shipping on silicon that is targeting flagship smartphone devices being launched in 2023.
To help solve the challenge of power, energy, and area, ray tracing on Immortalis-G715 only uses 4% of the shader core area and delivers more than 300% performance improvements through hardware acceleration.
Beyond Immortalis-G715, there are five practical tips and recommendations to tune up ray tracing performance on mobile devices that either offer software or hardware-based ray tracing support:
Every ray cast has a performance cost, so, if possible, minimize the number of rays used and only cast rays that are essential.
To achieve this aim, consider the following techniques:
Render at a lower resolution and then upscale appropriately.
Checkerboard rendering that allows only half of the rays to be traced in each frame.
Use temporal super-sampling techniques to distribute rays across multiple frames.
Use hybrid rendering methods, such as combining screen-space reflections (SSR) or even reflection probes with ray traced reflections, and shadow-maps with ray traced shadows.
Try to avoid casting unnecessary rays, with some examples below on how to achieve this:
Avoid tracing a ray if the surface is facing away from the light and therefore automatically in shadow.
Detect if a given pixel is in range of a light or on the far plane, so you can avoid casting the ray.
Use a simple shadow map to detect shadow edges, where shadow rays are more valuable.
Try to maximize ray coherency, which means hard shadows are faster than soft shadows and mirror reflections are faster than glossy reflections.
Also avoid shader divergence across neighboring threads to maximize shader throughput and exploit caching strategies, as spatially adjacent shader threads can result in different ray traversals and intersection logic.
Transparency requires more complex traversals and shader logic, which are both expensive. So, only use transparent geometry if it’s absolutely necessary for the game.
Ultimately, ray casting is expensive, so casting too many rays at once results in the frame taking too long. Therefore, make sure that every ray cast is required and provides useful information to the player.
Further reading:
Arm GPU Best Practices Developer Guide
Arm GPU Best Practices Developer Guide - Ray tracing use cases