Mega Cat Studios shares rendering optimization techniques used while developing Backyard Baseball in Unity, covering the CPU/GPU relationship, profiling-first workflows, occlusion culling, static batching, GPU instancing, and vertex animation textures (VAT) for animating thousands of objects like swaying grass and crowds. The post also compares URP versus HDRP, recommending URP for efficiency unless high-fidelity visuals are required, and offers extra tips like consolidating Update loops, using the Job System and Burst compiler, caching references, and avoiding duplicate texture loads.

12m read timeFrom unity.com
Post cover image
Table of contents
Investigate what’s causing rendering issues and then optimizeSimplifying and cullingStatic batchingGPU instancing

Questions this post answers

What is a vertex animation texture (VAT) and why would I use it in Unity instead of skinned mesh renderers?

A vertex animation texture encodes positional and rotational animation data into RGB values of a texture, which a shader reads each frame to move mesh vertices on the GPU instead of the CPU. Standard skinned mesh renderers with an Animator component only support a few dozen animated characters before performance drops, but combining VAT with GPU instancing allows thousands of animated entities on screen at once, at the cost of extra RAM usage and no collision updates. daily.dev surfaces practical rendering techniques like this for developers optimizing large-scale scenes.

Should I use Unity's URP or HDRP for a mobile or performance-sensitive game?

Universal Render Pipeline (URP) is recommended over High Definition Render Pipeline (HDRP) for mobile and untethered devices because it has better baseline performance and keeps rendering efficient. HDRP targets high-fidelity, realistic visuals and offers more specialized instancing behavior, but should only be chosen if a project specifically requires that level of visual fidelity. Developers weighing URP against HDRP can track rendering tradeoffs like these on daily.dev.

How does Unity's static batching optimization reduce draw calls?

Static batching combines multiple static game objects that share the same material into a single mesh, cutting down draw calls and reducing RAM usage and CPU overhead so the GPU can render more content at once. It requires setting objects like trees and walls to static, and works best when a project uses as few materials as possible across as many models as possible, though it increases GPU memory usage for the combined meshes. Anyone optimizing draw calls in Unity can find techniques like this through daily.dev.

295 Impressions