- Home /
Getting FPS drops on android after recently enabling lighting/shadows.
My Android game is setup using Toon shaders, I recently switched to a new one which allowed shadows. I now have a directional light in my scene with hard shadows, and Med shadow quality.
(Galaxy S6) My performance can be stable or it can vary. I can play the game at 60fps for 15 mins, but if I close the game and reload it the FPS is dropped all the way to 35FPS and response time doubles too. The same thing can happen, although I cannot for some reason replicate it when I'm just playing normal, the game just drops FPS almost in half.
Profiler says nothing at all. Nothing changes out of the ordinary, all the graphs, etc are below the 100fps line still.
Anyone have any suggestions at all? This is my first time working with lights on mobile.
Shadow settings: 1 Directional light. Forward rendering ShadowMask Hard Shadows only Medium resolution Stable Fit 11 3 No Cascades.
Ill also add just incase it's important. I'm setting Target frame rate to 60. And no sync on vsync.
I have seen posts about Thermal/CPU throttling but still don't have a solution, or if that's the problem at all. .
the fps only go to half after long periods of time? also, use the profiler connected to the phone for checking real fps, check the android information here https://docs.unity3d.com/$$anonymous$$anual/ProfilerWindow.html
Is it possible the change in shader is coincidental and something else is causing the drop?
Answer by Divinitize1 · Aug 09, 2019 at 11:23 PM
Right well, I haven't exactly found a fix, but more of a hack.
I was in the process of adding resolution scales to my options to help with performance etc. I for some reason assumed my Samsung Galaxy S6 default res was 1920x1080 so for testing I defaulted that as the resolution, I realized after playing a while, testing the new resolution settings that I put it in that I no longer got the frame drops that I did before.
I then come to realize that the Default S6 resolution is actually 2560x1440. So just by lowering it to 1920x1080 I had resolved the issues and had zero noticeable difference in resolution.
So until I can find a proper fix, I think that I'll just default all resolutions to 2/3 of their native on Start and just give the option to go native in the options if their devices can handle it.
Shadows really make my game "pop" so glad I could find a workaround without removing them completely. I'm still just going to go ahead and assume my issue is related to some sort of Throttling of either my CPU or GPU. And in today's world, an S6 is very outdated so I've got that going for me.
Your answer
Follow this Question
Related Questions
[Android] Debug vs Release build FPS 0 Answers
Profiler says that game is running at 10ms(100FPS) but on mobile runs at 45FPS. 2 Answers
how to drop mesh in all of directions? 0 Answers
Android fps problem. 0 Answers
android fps 0 Answers