Search Unity

How to change fullscreen upscaling or force native resolution change on device

Discussion in '2D' started by brigas, Oct 30, 2019.

  1. brigas

    brigas

    Joined:
    Oct 4, 2014
    Posts:
    522
    I am trying to achieve pixel perfect to some extent however I'm running into a problem when running unity in full screen when the native resolution is different than the resolution I set.

    My native resolution is 1920x1080 in every example:

    When I run unity in fullscreen mode at 1080p i get pixel perfect.
    I also get pixel perfect with windowed 1920x1080.
    With windowed 1280x720 I also get pixel perfect.
    However when I go full screen 1280x720 I no longer get pixel perfect. I understand this is because unity uses a bilinear formula to upscale the window 1.5x. In photoshop i can upscale 150% using nearest neighbour instead of bilinear to get pixel perfect

    I took some screenshots to show the problem.
    Untitled.png
    the leftside image is unity in windowed mode 720p, the middle is unity in full screen 720p, the right is how I wanted it to look. A 2x2 pixel in 720p should become a 3x3 pixel in 1080p, however as you can see in the middle image unity is "blurring" the upscale by using bilinear instead of nearest neighbor, which I upscaled in photoshop on the right side image.

    I was wondering if there was a way to change the way unity upscales lower resolutions to nearest neighbor, or otherwise, force the device running unity to change it's native resolution( this happens in many old games when run on newer systems, I've found that many old 640x360 games running on newer systems will tamper with your native resolution, when you alt tab from them you can see your desktop screwed up with all icons zoomed and scrambled to fit in the smaller space, I was wondering if unity had this same feature?) Thanks!