Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Small FPS on Android mobile phone
#9
(15-01-2020, 09:05 AM)josemendez Wrote: Hi there,

Sure. Unity's GetTemporaryRT function (which is what is used to create the buffers in the FluidRenderer) will return a full screen buffer if passed -1 as the resolution, half-screen if passed -2, quarter-screen if passed -3, etc.

So simply try using lower values (I'd start with -2) in the renderFluid.GetTemporaryRT() calls in ObiFluidRenderer.cs UpdateFluidRenderingCommandBuffer() function. For instance:

Code:
// refraction (background), foam and fluid depth buffers:
renderFluid.GetTemporaryRT(refraction,-2,-2,0,FilterMode.Bilinear);
renderFluid.GetTemporaryRT(foam,-2,-2,0,FilterMode.Bilinear);
renderFluid.GetTemporaryRT(depth,-2,-2,24,FilterMode.Point,RenderTextureFormat.Depth);
    
// thickness/color, surface depth and normals buffers:
renderFluid.GetTemporaryRT(thickness1,-2,-2,16,FilterMode.Bilinear,RenderTextureFormat.ARGBHalf);
renderFluid.GetTemporaryRT(thickness2,-2,-2,0,FilterMode.Bilinear,RenderTextureFormat.ARGBHalf);
renderFluid.GetTemporaryRT(smoothDepth,-2,-2,0,FilterMode.Point,RenderTextureFormat.RFloat);
renderFluid.GetTemporaryRT(normals,-2,-2,0,FilterMode.Bilinear,RenderTextureFormat.ARGBHalf);

By default they all use full-screen resolution, except the thickness/color buffers which are rendered at half-resolution (they are blurred afterwards, so we don't need much detail).

This *should* improve performance in devices with high-density screens and low fillrate. Anyway, any tweaks you make should be profiling-driven (and always profile in the actual device, not the editor). Changing stuff without actually knowing if it impacts performance in your particular device is a waste of time at best.

Thank you for your prompt reply and for your support!

Yeah exactly, based on the profiling that I did I'm trying to improve the rendering part and also the collision/trigger handling side of things.

I will profile this and let's see the results.
Reply


Messages In This Thread
RE: Small FPS on Android mobile phone - by N0Skillz - 15-01-2020, 09:54 AM
RE: Small FPS on Android mobile phone - by ktpttd - 15-02-2020, 05:38 AM