- Home /
Android built game unity Profiler.render drawing clear and GPUProfiler.endQueries cause spikes.
@florianveltman Hello everyone. I just built and run a game on my android device (samsung Galaxy J7 prime) and noticed the spikes in unity profiler. The sceene has flat terrain with default material and 3 different vehicle models and a tps char and all materials are set to mobile defuse... Camera settings and profiler logs are shown in the pictures below. Any ideas what is causing the clear and endqueries. Thank you for your time.
http://imgur.com/SgCNF4P http://imgur.com/cGIPnU6 http://imgur.com/NjmRINR http://imgur.com/54QxCNI http://imgur.com/Wqtlmt2
damn good coffee.. Still Clear is causing problems. I changed the clear flags into solid, skybox , dept and dont clear but none of them worked. Have couple of cameras with same settings. Added fog and will try with it now.. Any ideas..
What i have done so far; Deleted terrain and add new one, didnt help. removed directional realtime lighting and add baked lightmapping, didnt help. Occolusion culling, didnt help. Added fog, didnt help... What is weird is renderforwardopaque clear shows only one item in frame debugger and it doesnt show any details
Day 5; still no answer from community. Removed gaia terrain and added regular one. Seems terrain is causing the problem. Have a flat terrain with one texture and eventho when camera looks at terrain fps rate drops down to 26-27 fps. If camera looks at models or sky fps is about 45-57 fps. Gonna switch terrain textures or try terrain composer. Have to add height but it will increase poly count. Gonna edit one script which i suspecT using cpu, it is using raycast to position target sprite on ui canvas if it collides something. It seems it is not suitable for mobile.. still waiting for reply..
Answer by omerselman · Jul 04, 2017 at 12:24 PM
day 9 : found a solution. Increased the terrain size and baked occulision culling again. Took a while to bake and terrain texture looks cheap but at least damn clear is gone. Now need to figure out how to fix texture. It is weird that 2000x2000x400 size terrain had way way worse FPS than 10000x10000x4000 The fps is between 33 and 57 now..