WebXR - AR - Capped at 30fps

I’m new to pretty much everything here (from Babylon.JS to WebXR). Noticed that (with the default experience generator), I’m getting 30fps max with immersive AR on my mobile devices (GalaxyS9 & Xiomi Note5). Is there something I can do or is that built into the device/WebXR etc.?


Pinging @RaananW

There is no cap set by babylon, that’s for sure. if there is one, it is set by the device. As it is using the device’s camera (which might only support 30 fps) it makes sense that the device will cap performance.

How are you checking it? want to share a playground?

I’ll have to clean up my code a bit for the playground :stuck_out_tongue:

In the meanwhile; all I’m really doing is:
framerateDisplay.text = engine.getFps().toFixed() + " fps";

Where the “framerateDisplay” is just a TextBlock element.

Is there a way to check for the camera stats through Babylon.js or some other API?

(by the way, I’ve started this week both with javascript and babylon.js - coming over from Unity/Monogame and I must say, I really enjoy working with the engine).


I assume you are running this on each XR frame. This is the simplest way to do that.

Sadly we don’t get any information about the AR system’s performance. I am saying system, as AR is not only for phones. Hololens, for example, also supports AR session. The real world there is not displayed using a camera, but using the… well, real world? :slight_smile:

What we do it run the frames as fast as the system allows us. I find it harsh that it is capped in 30 FPS! I will need to run some tests with different devices to see what other devices are delivering.

This is exactly what we are aiming for! :slight_smile: Thanks a lot for the feedback!