`engine.disableUniformBuffers` is set to false in mobile mode, and cause a bad performance

In mobile mode, it take a long time to render the first frame.(about 7s)

With same model file: if I change engine.disableUniformBuffers value to true manually after I create my engine, it perform good.(about 1s)


Chrome: 113.0.5672.126
Os: MacBook Pro, Apple M2

This is probably because of this bug:

https://bugs.chromium.org/p/chromium/issues/detail?id=1267322&q=getUniformBlockIndex&can=2

However, we should detect Mac OS + Chrome and disable uniform buffers in that case. What can you see when you type navigator.userAgent in the console of the browser?

1 Like

@ling can you try to force the Metal backend ? cause it should even be the default now ? I wonder why you still encounter this behavior ?

Also Chrome Macos is meant to disable UBO usage here Babylon.js/thinEngine.ts at 4d15c1520687524381d760471f39233cab6daae7 · BabylonJS/Babylon.js · GitHub this is getting stranger.

Yup your navigator.userAgent will help us a great deal.

Let me close as a dupplicate of Babylonjs takes longer to render the first frame on mobile compared to Threejs - #8 by sebavan