IOS: Overall drop in framerate

Has anyone else notice an overall drop in framerate with the last few ios updates from apple ?

I have a deployed 3D Web Application written using BabylonJS. Over the past few updates from apple, the previous deployed application now runs much slower on ios devices than it did before.

Note: Android devices continue to run the app buttery smooth (100+ FPS) only capped at the device refresh rate (120 FPS)

using webgpu or webgl? I know that several users had to switch using metal from the settings as Apple continues to want to demonstrate to the world how bad their browser can be

3 Likes

WebGL…

What do you mean switch using metal ? Is that an IOS setting, like enabling WebGPU is ?

Correct

Yo @Deltakosh

Do you know the name of this setting, I dont see one called Metal in feature flags

ok I checked it is no more there. So I’m afraid this is an iOS regression

You can try to enable those to see if it has any impact on perf (the usual suspects with Apple):

  • engine.disableUniformBuffers = true
  • engine.disableVertexArrayObjects = true

I will try

engine.disableUniformBuffers = true
engine.disableVertexArrayObjects = true

That did not seem to help. So I will keep investigating…

Would luv to hear if some of the other BJS users are experiencing IOS performance issue of late

Yo @Deltakosh … So it turns out it was the shadow generator

This was our shadow setup since the app was create, years ago.

this.shadowGenerator = new BABYLON.ShadowGenerator(1024, light);
this.shadowGenerator.bias = 0.001;
this.shadowGenerator.normalBias = 0.0000001;
this.shadowGenerator.useContactHardeningShadow = true;
this.shadowGenerator.contactHardeningLightSizeUVRatio = 0.08;
this.shadowGenerator.setDarkness(0.45);

Now after recent updates this same code for shadows drops frame rate on IOS to under 6-7fps

WHISKY-TANGO-FOXTROT APPLE

Of course if I just remove the shadow generator, is really fast, only capped by refresh rate

If I simply switch to the cascade shadow generator, the framerate goes back up to 58-60fps
but is MUCH more taxing on the device and eventually throttles because of heat issues

Got any thoughts on how to handle this @Deltakosh

1 Like

You can try to use another filtering method (like PCF) in case it’s something related to PCSS (contact hardening).

:sweat_smile:

2 Likes

So looks like the issue was Contact Hardening filters was TAXING the frame rate on IOS.

On both BABYLON.ShadowGenerator and BABYLON.CascadeShadowGenerator

the non-csm version was just really bad. After latest apple updates, using contact hardening filters really sucks.

We basically switching to PCF filters

1 Like

iOS sucks so much…

3 Likes