#Hello! My name is Ricky, and me and a

1 messages · Page 1 of 1 (latest)

tight gorge
timid void
#

Are you sure that occlusion culling is set up correctly?

tight gorge
#

Currently its off again

#

Lemme turn it on and show you again!

timid void
#

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

tight gorge
#

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

timid void
#

This way you see what is taking up most of the time

tight gorge
#

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;

bleak hound
# tight gorge Could any of that explain this?

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.

  1. Use GPU instancing (Tick said thing in material and untick static flag in gameobjects)
  2. Occlusion Culling - built-in OC is shitty, but make sure you baked the scene for that, it's still not pixel perfect OC
  3. 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
  4. Use same material as much as possible
  5. Texture atlases, use it and GPU instancer will thank you
  6. 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

But as usual: https://forum.unity.com/threads/mega-runtime-performance-tips-thread-unity-hdrp-guide-to-better-runtime-unity-performance.1169837/

tight gorge
#

Yes, i dont know how its possible to have so many. We dont have that many assets

tight gorge
#

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:

tight gorge