While playing with the really nice Greenwood Fantasy Village Marketplace asset, trying to do a little mobile game, I want to share some experiences I made with reducing complexity from overdraw and with Decals.
Overall, I am fighting with performance issues, because of my old Phone with Mali T860 chip. But I believe, using old hardware is good for learning performance tuning and profiling. While it is running with 60fps on a friends Pixel4a (rather boring)- it drops to 8fps on my phone. Doing a lot on this, e.g. culling optimization.
First, I tried to change some meshes to be more optimized in terms of overdraw, after finding, that shader complexity, while shown as green in SM5 preview, is bad in ES31 preview.
Changing the mesh for the hay that floats above ground from a simple quad to some more optimized shape reduces overdraw a lot:
Same applies to the trees, which I did change as well. What is interesting: in SM5 preview, shader complexity is shown green, while in ES31 preview, it becomes expensive.
So this one does not really help actually, and my limits seem to be elsewhere. (Unfortunately, no GPU profiling data is available on mobile at all to see what is exactly happening)
Now for the next step with Decals:
I thought, I could go further and optimize this one by using real decals projected on ground instead of those planes. Creating everything with a dbuffer decal material and testing now shows the following:
So result: using dbuffer decals is even worse than using the mesh in terms of shader complexity.
I tested with mesh decals as well, using the example asset available in Epic docs, same here:
Apart from this, I found, that dbuffer decals do not get rendered nicely in ES31 / Android device:
- CSM Shadows do not get received by the decal on mobile
- Colors look as if they are unlit? - at least pale coloring
Compared to SM5 preview, which looks nice: