UnityRef is currently in early development. Some features may be incomplete and/or not functioning.

UNITYREF

Your Pit Stop For Solving ANYTHING in Unity

graphics

[Quest 2] Tiled GPU Overdraw: Unmasking Performance Drops

Under Audit

performancevirtual realitybuild optimizationproject architecture

Unity 2021.3.x - Unity 6.x

Published Wed, Mar 18

Developers profiling rendering on Quest 2 may find that expected overdraw optimizations on tiled-based GPUs do not perform as theory suggests, leading to unexpected performance degradation and a need for active overdraw management.

Issue

 Developers profiling rendering on Quest 2 using OVRGPUProfiler may observe results that are inconsistent with common advice regarding overdraw optimization on tiled GPUs. The Snapdragon XR2 GPU, utilized in Quest 2, is a tiled-based architecture theoretically designed to leverage triangle binning to minimize overdraw. Conventional wisdom suggests that a Z Prepass might be counterproductive on such GPUs, as they perform per-tile triangle sorting to reduce pixel shader executions. Similarly, alpha test is often advised against due to its potential to disrupt these sorting optimizations. However, practical tests reveal a different outcome. In a simplified scene using a single material and quads arranged to simulate varying levels of overdraw, GPU usage significantly increases with higher overdraw. This performance impact is primarily attributed to pixel shader execution rather than vertex shaders, especially when using a heavy Unity standard shader with multiple texture maps. This creates a paradox where mobile GPUs are advertised for their efficiency in handling overdraw, yet tangible performance gains are achieved by actively managing and reducing overdraw. Furthermore, profiling in more complex scenarios indicates that a well-implemented z-prepass (in a single drawcall) can often be beneficial for scenes employing heavy pixel shaders in mobile VR. There is also a question regarding how renderQueue behavior, specifically the default Unity rendering order (e.g., renderQueue 2450 for alpha test versus 2000 for opaque), integrates with the tile-based GPU's supposed ability to handle all drawcalls for a given tile simultaneously."

Experimental Fixes
  • Consider implementing a Z-Prepass to reduce pixel shader execution, especially for scenes with heavy shaders, even on platforms with tiled GPUs.
  • Actively manage and minimize overdraw in your scenes through careful asset optimization and level design, rather than relying solely on theoretical GPU optimizations.
  • Minimize the use of alpha test where possible, or ensure transparent geometry is sorted and rendered appropriately to avoid disrupting tile-based GPU optimizations.

Editor's Note:

The above fixes have not been verified by our audit team yet. They are provided exclusively for your own technical research. We recommend creating a backup of your project before proceeding with any attempts. Utilize at your own discretion!

Related Posts Haven't quite found a solution to your problem? We think these posts might help you.

Content inspired by a Unity discussion post.