#Hello! My name is Ricky, and me and a
1 messages · Page 1 of 1 (latest)
71 million triangles is worrying
Are you sure that occlusion culling is set up correctly?
Most of the time is spent on the CPU too. 45ms on cpu, only 6ms on render thread.
Try the profiler to see what is taking up time
I really dont know much about the profiler
More accurate frame with game view full screened
This is a screenshot from the profiler on a stand-alone build
And this is a spike
Switch from Timeline to Hierarchy view and you can see a list of functions that ran at the selected frame. You can then sort then by the time they took to run (Time ms, I think)
This way you see what is taking up most of the time
Could any of that explain this?
Because in my head this should be VSYNC related, so i turned it off in the quality settings and added this to my code, but it keeps happening: Application.targetFrameRate = -1;
That's because your GPU is just chilling, no, even sleeping at this point. You are CPU bound and CPU desperately trying to send information to GPU - hence the bottleneck. You need to relax CPU usage quite a bit.
- Use GPU instancing (Tick said thing in material and untick static flag in gameobjects)
- Occlusion Culling - built-in OC is shitty, but make sure you baked the scene for that, it's still not pixel perfect OC
- Use mesh combining, you can write your own and buy assets on asset store, it's basically brute forced GPU Instancing but with same material
- Use same material as much as possible
- Texture atlases, use it and GPU instancer will thank you
- Don't forget that all prefabs or game objects are initially CPU things, once you place any object make sure it could be transferred to GPU without any hassle
Yes, i dont know how its possible to have so many. We dont have that many assets
So here is the weird part.
We tested without terrain, and replaced it with a cube.
We tested this on a high-end pc and got this: