Major lag when zoomed in close. Any ideas? (android)
I've run into a strange performance problem and I was wondering if anyone knew a fix or workaround.
I have a solar system with a handful of planets (default unity spheres with 2k textures), when zoomed out from a planet the game runs perfectly smooth on the android devices the app is designed for, but as the camera gets closer the framerate drops more and more until it gets below 10 fps when the planet takes up the whole screen.
It does it with both standard and the custom planet shader I'm using, as well as on planets with no atmosphere, so it's literally just a sphere with a standard shader (albedo + normals) and nothing else.
The CPU profiler is taken up by Gfx.WaitForPresent, and unfortunately the GPU profiler won't work on my target device.
The weird thing is the device has no problem rendering well over 20 planets on screen at once, but it can't handle zooming in on one planet...
Is this really just the cost of working with mobile? Or am I missing something?
Screenshot included:
Answer by Bunny83 · May 05, 2018 at 02:09 AM
Well, mobile devices are very limited performance wise. They have a quite low fillrate. If the performance drops based on how much area of the screen is filled it's either the fillrate or the fragment shader. Unity's standard shader is extremely expensive. Try switching to a mobile shader. You may want to have a look at this blog post
Your answer
Follow this Question
Related Questions
Bad Performance URP 0 Answers
Really High CPU usage On empty scenes/new projects (ApplicationTickTimer problem) profiler pics 0 Answers
Rendering Game in 2D LAGS!!!! 0 Answers
Large Graphics.PresentAndSync Spikes on Android 2 Answers
Unity Basic Project Lags on Android, works perfect on Editor 0 Answers