Variable Rate Shading on Adreno GPUs

Bonsai 3D live wallpaper screenshot

What is Variable Rate Shading

VRS — image by Qualcomm
  1. It preserves geometry edges (except cases when the shape is determined by discarding fragments).
  2. Can be adjusted per each draw call — one object can be rendered at full detail while the other one will have reduced quality.
  3. Can be applied dynamically to keep target FPS by gradually reducing image quality.

Current state of VRS-capable hardware

Implementation

Screenshot of Bonsai 3D live wallpaper
VRS artifacts on geometry with discarded fragments
Bonsai 3D live wallpaper silhouette mode
  1. Alpha-testing for leaves. We already know that we should not apply VRS to these geometries.
  2. Solid black silhouette and ground. The heaviest 4x4 VRS introduces literally zero quality degradation.
  3. For the sky gradient we use 2x1 blocks. Technically it would be perfect to have a 4x1 or even 16x1 blocks because gradient changes vertically and adjacent horizontal fragments have identical color but Adreno hardware supports only 2x1 ones.

Dynamic quality

Performance gains vs quality tradeoff

Difference between original and VRS rendering

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store