12-09-2018, 01:36 PM
(12-09-2018, 08:19 AM)josemendez Wrote: Fillrate is most mobile devices achilles' heel, so moving the camera closer to the fluid (making it fill the entire screen) is probably getting the GPU to its knees. If you'd profile this, you'd see the fragment shaders taking up most of the frame time.
One easy way to alleviate this is to simply reduce the fluid rendering resolution. To do this, go to the UpdateFluidRenderingCommandBuffer() method in ObiFluidRenderer.cs, and reduce the resolution of all buffers. For instance:
Code:renderFluid.GetTemporaryRT(refraction,-1,-1,0,FilterMode.Bilinear);
would become this, if rendering at half-screen resolution:
Code:renderFluid.GetTemporaryRT(refraction,-2,-2,0,FilterMode.Bilinear);
Currently only the thickness buffers are rendered at half-res, but I think you can get away with less resolution for pretty much all buffers.
Yes, this was in fact my planned next step. Thanks for the pointer.