Profile and debug when using variable rate shading
View performance improvements and debug a project that uses variable rate shading.
Read time 1 minuteLast updated 21 days ago
Use the Rendering Debugger or Unity Profiler to monitor GPU frame time and measure performance improvements with variable rate shading. To visualize the shading rate image for render passes that use variable rate shading, use the Frame Debugger.
Use the Rendering Debugger
-
Open the Rendering Debugger window (menu: Window > Analysis > Rendering Debugger).
-
Select the Display Stats panel.
-
In the Frame Stats section, view the GPU frame time metrics.
After implementing variable rate shading, you can observe lower frame time values indicating improved GPU performance.
For more information, refer to the Rendering Debugger window reference for URP.
Use the Unity Profiler
- Open the Profiler window (menu: Window > Analysis > Profiler).
- In the Profiler window, select the CPU Usage module.
- In the Timeline or Hierarchy view for the selected module, look for the profiler marker.
Gfx.WaitForPresentOnGfxThread
A reduction in the marker indicates improved GPU performance.
Gfx.WaitForPresentOnGfxThreadFor more information, refer to Profiler markers.
Use the Frame Debugger
- Open the Frame Debugger window (menu: Window > Analysis > Frame Debugger).
- Enable the Frame Debugger.
- In the events list, select the rendering event from a pass that uses variable rate shading.
- In the Event Information panel, expand the Details section.
- Locate the Shading Rate Image property for the color visualization of the shading rate image attachment.