Is the Fullscreen GUI supposed to grow when using SceneOptimizer?

Check out the docs example for SceneOptimizer: Babylon.js Playground

Press start and, once it gets to sub-sampling the render resolution, the fullscreen GUI buttons start to grow. I see the same issue in my app with fullscreen GUI growing and also positions changing.

Is this an expected behavior and we should recalculate GUI sizes & positions when the optimizer changes resolution?

It is kind of :slight_smile:
I recommend to simply ajust the renderRatio of your GUI probably :wink:

okay thanks! Adjusting the renderScale of the GUI ADT to match the HardwareScalingOptimization current scale definitely seems to do the trick.

So I thought I would use the onNewOptimizationAppliedObservable to watch for hardware scaling changes and adjust my GUI, but it seems the currentScale of the HardwareScalingOptimization is not available anywhere on its public API. Am I missing somewhere this value would be available?

EDIT: I think I see it, based on HardwareScalingOptimization's source I think I could use scene.getEngine().getHardwareScalingLevel()

1 Like