# Mobile sharpness

**URL:** <https://forum.babylonjs.com/t/mobile-sharpness/54029>\
**Category:** Questions\
**Created:** [October 9, 2024, 4:33pm UTC](https://forum.babylonjs.com/t/mobile-sharpness/54029 "2024-10-09T16:33:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adam\_A](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/adam_a/32/35295_2.png) [@Adam\_A](https://forum.babylonjs.com/u/Adam_A)\
**Post date:** [October 9, 2024, 4:33pm UTC](https://forum.babylonjs.com/t/mobile-sharpness/54029/1 "2024-10-09T16:33:47Z")

</div>

Hi, in order to achieve a sharp image on mobile i am using this script:

const pixelRatio = window.devicePixelRatio;  
if ( pixelRatio \>= 1) {  
scalingValue = 1 ; // HDPI displays  
}  
else {  
scalingValue = 0.5; // no-HDPI displays  
};  
engine.setHardwareScalingLevel(scalingValue / pixelRatio)

I noticed that the view is slightly squished on portrait mode, what is the ideal method of achieving it without any distorted ratios? Thanks.

---

<div class="post-metadata">

**Author:** ![labris](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/labris/32/12576_2.png) [@labris](https://forum.babylonjs.com/u/labris)\
**Post date:** [October 9, 2024, 4:43pm UTC](https://forum.babylonjs.com/t/mobile-sharpness/54029/2 "2024-10-09T16:43:35Z")

</div>

I believe it comes from too low value in portrait mode.  
You may try to make it fixed if lower than fixed value.
