Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Upscale blur of pixel art game

Discussion in '2D' started by djfrail, Jun 10, 2021.

  1. djfrail

    djfrail

    Joined:
    Jan 16, 2014
    Posts:
    124
    I'm making a PC pixel art game and am having an issue with running a build fullscreen at a resolution lower the desktop resolution. The lower resolution gets upscaled to the desktop resolution, but it does so with bilinear filtering, which blurs the pixel art.

    I'm using a shader based on this article https://colececil.io/blog/2017/scaling-pixel-art-without-destroying-it/
    It does a nice job of letting you zoom in/out on pixelart and have it still look good!

    It works great if you run in a window or fullscreen at the same resolution as desktop, but fullscreen at a lower resolution has the upscale blur problem.

    Any ideas to get around the upscale blurring? Thanks!
     
  2. TheNightglow

    TheNightglow

    Joined:
    Oct 1, 2018
    Posts:
    201
    I m a bit confused about what you are trying to do... you dont need to do anything the article says in unity because unity has stuff for this already integrated

    just select "Point No Filter" in the inspector of your texture asset, and set the compression to none
     
    FrankTheStud likes this.
  3. rarac

    rarac

    Joined:
    Feb 14, 2021
    Posts:
    570
    i know what you are saying, I have the same issue and I already found that there is no fix for this. You will have to hope to try to contact a unity developer and ask if they can include a way to force native resolution to change. As for now if you run your game at different resolution than the current on desktop it will be a mess
     
  4. djfrail

    djfrail

    Joined:
    Jan 16, 2014
    Posts:
    124
    The textures all need to be set to bilinear filtering for the shader to do it’s pixel art magic.

    But similar to what you’re saying, I think if I could somehow choose point filtering (instead of bilinear) for when the upscaling from low resolution to desktop resolution happens, that could fix the problem.
     
  5. rarac

    rarac

    Joined:
    Feb 14, 2021
    Posts:
    570
    it wont work, even if you use point filter it will still blur if you use difrent resolution than desktop
     
  6. xtytyx

    xtytyx

    Joined:
    Dec 29, 2017
    Posts:
    24
    are you using the pixel perfect camera? @djfrail
     
  7. djfrail

    djfrail

    Joined:
    Jan 16, 2014
    Posts:
    124
    No - I'm using Unity 5.6