I Set adaptToDeviceRatio to true, but it is useless

Hi

I use photodome to create webvr, but it is very fuzzy on the mobile side, so I set the adaptToDeviceRatio of the engine to true, but it doesn’t work.Already clear the cache

What’s it supposed to do?

I don’t know, I tried to modify the width and height of the canvas, but it didn’t work, it’s still very fuzzy

This flag is an engine flag that adjusts the hardware scaling level like this:

this._hardwareScalingLevel = adaptToDeviceRatio ? 1.0 / Math.min(limitDeviceRatio, devicePixelRatio) : 1.0;

But, as hardware scaling doesn’t work in XR (as XR doesn’t use the canvas directly) you won’t notice it in XR.

what exactly are you trying to achieve? Want to share a repro?

my divicePixelRatio is 3.0
xr.engine.setHardwareScalingLevel(1.0 / window.devicePixelRatio))
it’s still very fuzzy

I see. thanks
I want to show some vr pictures using babylonjs.

XR is bound to the HUD’s resolution, but you can achieve the same effect as hardware scaling if you define the framebuffer scaling when initializing your session. These are the default values - Babylon.js/webXRManagedOutputCanvas.ts at master · BabylonJS/Babylon.js · GitHub

You can use it this way - https://www.babylonjs-playground.com/#5EQA9Y#3

Thanks, I try :smiley: