1
\$\begingroup\$

I have stumbled upon an issue that is now taking a lot more time than I assumed. I have a game that has a lagging issue and I have tried almost all techniques that I could remember to fix that but now I am in desperate need of advice. I am on Unity 2019.4.14f1 (URP)

I have done the following:

  1. Turned off everything including UI and still CPU around 40ms and 25fps on Samsung Galaxy S6
  2. Optimized Memory though textures compression of RGBA Crunched ETC2 or RGB Crunched ETC as needed.
  3. Added target framerate = 60 as without this Semaphore.WaitForSignal took a lot more CPU ms and was resulting in even worst FPS even in an empty scene.
  4. Turned off vSync
  5. Turned off all sort of lights in the game
  6. Tried turning off scriptable render features just to be sure they are not culprits.

Here are the setting screenshots:

Quality Setting

URP-renderer

URP

Here are profiling screenshots of gameplay without turning off everything.

FrameA

FrameB

Here are the screenshots when everything including Ui, 3D Env/Char, and lights are turned off.

FrameA

FrameB

\$\endgroup\$
8
  • \$\begingroup\$ Can you tell us what the "...iceVK.Present" line in the Render Thread section says, in full? I'm not getting hits for that term, though I do find potentially related advice for Device.Present... \$\endgroup\$ – DMGregory Nov 10 '20 at 20:48
  • \$\begingroup\$ It's saying GfxDeviceVK.Present(40.95ms). \$\endgroup\$ – Syed Munim Raza Nov 11 '20 at 6:36
  • \$\begingroup\$ About the other thread that you recommended I saw and I have ensured following: 1. No Image Effects on Camera (Turned off Post-processing) 2. No Shadows 3. V Sync Off 4. Auto-Graphics is off with Vulkan and OpenGLES3 and Require ES3.2 ticked 5. UI off so there is no Image with Alpha 6. Custom Shaders did exist but as everything is turned off so I don't think they are contributing. \$\endgroup\$ – Syed Munim Raza Nov 11 '20 at 6:51
  • \$\begingroup\$ What about that Kawase Blur I see in your renderer configuration? \$\endgroup\$ – DMGregory Nov 11 '20 at 7:07
  • 1
    \$\begingroup\$ So I found the culprit that I was missing as Kawase Blur wasn't creating an issue. There was another camera that was not being rendered but it had post-processing turned on and anti-aliasing set to fast approximate. When I turned off that gameobject FPS jumped back to around 55FPS and after 3 mins of idle-ness it got back to around 25 - 30 FPS which was caused by heatup issue because the device was quite hot after 3 mins. \$\endgroup\$ – Syed Munim Raza Nov 11 '20 at 8:07
0
\$\begingroup\$

So after a lot of digging finally achieved 60 FPS on Samsung Galaxy S6 with the following steps:

  1. Included Graphics APIs OpenGLES2
  2. Texture streaming and generated mipmaps and mipmap streaming
  3. Incremental GC
  4. C++ Compiler set to Master (was previously set to Debug)
  5. Depth Texture off in URP
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.