How can i optimize the resolution of image and text?

Hi,
I believe the below lines of code should do the trick.

engine.setHardwareScalingLevel(1 / window.devicePixelRatio);

window.addEventListener(“resize”, () => {
advancedTexture.scaleTo(engine.getRenderWidth(), engine.getRenderHeight());
});

Else, there are a number of posts around with this subject.

1 Like