Hi people:)
So, on an off I test the waters to see if it would be worth to switch to the, now “universal” render pipeline, on my android project in terms of performance.
At the moment I rely on large texture atlases (single material) to keep drawcalls low, so I was hoping the SRP batcher would allow more materials without penalties.
- Test scene contains 1024 houses (32x32 grid), static with baked lightmaps.
- Each mesh/house is a single mesh and sums 697 verts, 917tris.
Testing was done on my HTC10, which supports ES3.2 and according to systeminfo.graphicsDeviceVersion was running that. All materials use “Simple lit” shader.
Test 1
Single material, reused on all meshes. 2048 diffuse texture assigned (see image 01 for ref.).
60+ fps
Test 2
Each house use a single material but vary between 16 different ones, each assigned a 512 diffuse texture (see image 02 for ref.).
In this scene I reached 60+ fps with or without SRP batcher enabled. I know this is capped but other tests done shown no benefit having SRP batcher on or off. Looking at the frame debugger, its clearly doing its job, but theres no performance difference.
Test 3
Each house use 4 different materials (submesh) with 4 different variants within scene (so again 16 different materials in all), each material use a 512 diffuse texture like before (see image 03 for ref.).
This is where things get interesting.
SRP batching OFF
60+ fps
SRP batching ON
36 fps!
It seems assigning multiple materials to the same mesh (different parts of cause) has a huge impact on performance when SRP batching is enabled.
I know 16 different materials within a scene isn’t a lot, but I’m surprised to see almost nothing gained when toggling SRP batching on an off. I’m also really sad it see it tank when using submesh materials, especially having thought it the other way around.
Am I just doing it wrong?
Cheers