Hello everyone,
I would like to give feedback to Resident Drawer feature in Unity 6.
I have downloaded and tested the medieval free demo for Unity URP. This asset had function to profile CPU & GPU usage with Resident Drawer on and off. To my surprise demo with RD on had lower performance than off. Both CPU and GPU usage were higher, also FPS output was lower. Yes, the number of draw calls and vertices were significantly lower thanks to RD but it seems that in the end the cost in computing it is higher than the gain.
Here are some examples:
Resident Drawer On
1502 draws
0.8m verices
120/125 fps
CPU 6.1 ms
GPU 5/6ms
ResidentDrawer Off
1788 Draws
3.9m Verices
125/131 fps
CPU 5.8 ms
GPU 4/5 ms
So the qustion is, it it a bug and RD should be better or is this just not a good use case for RD?
Thanks for reading
On which platform are you testing it on? It is also important to only test in in the build, and not in the editor.
The features highlighted in the Fantasy Kingdom in Unity 6 Demo have different benefits depending on the platform and particular device it is running on. It also depends what camera view is currently active.
For example here in this camera angle where all three castles are visible, the gain can be massive on a high-end PC:
It is important to note that behind the “GPU Resident Drawer” button, also GPU Occlusion culling gets activated/deactivated. This is likely a benefit on this hardware, because the GPU also improves a lot in this particular example. But it requires an additional visibility buffer, that might be a bigger overhead on other platforms. The scene is set up to have a high instancing potential, and that benefited a lot in this view.
On other platforms or views, the advantage could be different. For example, STP can help greatly if the device is currently GPU-bound, e.g. when running on high-pixel density mobile phones. But it also has it’s own cost. But the cost can offset other expensive full-screen effects, and make them suitable for mobile.
GPU resident drawer can also improve CPU here, like in this profile on iPhone 14 Pro:
But if the CPU improvements from GPU Resident Drawer help on such a device is then hard to answer in general terms. Because the device in theory has less work to do, but sometimes the CPU is anyhow prevented from sleeping with artificial cycles…
Same for RenderGraph to give another example, which helps mostly on mobile to reduce memory bandwidth, which reduces heat, which long term improves performance by preventing throttling of the chip. But you might only see this improvement after running for a few minutes. Performance measurement is always a little tricky Maybe you would also be interested in our talk around that topic at Unite Barcelona: https://youtu.be/Oc6T4hh5gaI?si=9WT9NlxgRVVXgtvJ