I have been facing this issue for a long time that builds were working fine on PC and iOS devices, but have very low fps on Android. I confirmed the issue is from playcanvas when I created a simple model viewer project and checked Device Pixel Ratio from Rendering in Settings. Did some face the same issue? Any workarounds? Not only low fps but also stretched.
Simple Model Viewer: Model Viewer - PLAYCANVAS
On my Samsung S23 the project works fine.
Which Android device do you use?
I am using Redmi note 11 pro. Your device is way too high end android
I just tried it on my Samsung Galaxy Tab A8 (2022) and I get indeed a low frame rate of 25.
It makes sense that using Device Pixel Ratio gives a lower frame rate on older devices, because as far as I know, disabling this option is intended to allow the project to work properly on lesser devices.
I must admit that I did not expect the frame rate to be so low on my tablet.
And this started happing few months ago, before that everything was ok even on my same mobile
Unfortunately, I don’t know what could be causing these problems, so someone from the PlayCanvas team will have to help with this. (By the way, the model is not stretched on my tablet and looks as expected).
I also checked it with @Saad_Haider it was stretched on some devices. Maybe if fps are too low then it causes problems
It could be related to that project using VSM shadows, which renders shadow map to RGBA16 render target
Could you try setting ShadowType to PCF3 or PCF1 instead of Variance Shadow Map 16.
Or even disable shadows completely for testing.
Nope @mvaligursky , shadows did nothing
Build with shadows disabled: Model Viewer - PLAYCANVAS
Try disabling clustered lighting (in rendering settings) if you don’t need lots of dynamic lights:
Nope @slimbuck this also did not work.
Link with clustered lighting disabled: Model Viewer - PLAYCANVAS
Please now try enabling “Transparent Canvas”, also under RENDER settings.
No @slimbuck, Transparent Canvas also does nothing
Link: Model Viewer - PLAYCANVAS
There is one last option - perhaps you had Anti-Alias disabled before?
So at this point I think there can only really be three culprits:
- too many pixels due to DevicePixelRatio
- too many pixels due to Anti Aliasing / MSAA
- as mentioned by @mvaligursky, VSM shadow rendering of 1024x1024 floating point buffer
If you disable Anti-Aliasing, disable DevicePixelRatio and use PCF shadows instead of VSM it basically has to run faster on your old phone
This does the. Anti-Aliasing. So we can mark this one as solved @slimbuck