Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

Incorrect scaling fullscreen, Pixel perfect camera

Discussion in '2D' started by agelvik, Jan 27, 2020.

  1. agelvik

    agelvik

    Joined:
    Nov 6, 2015
    Posts:
    23
    Hey, I'm having some troubles with Pixel Perfect Camera component.
    My resolution ref is 384x216.

    On build, if i set fullscreen on monitor with 1920x1080 it works fine, however monitor with 3840x2160 gets messy. UI visuals doesn't match original and there are black borders, as if the resolution was 3456x1944.

    384x216 and 3840x2160 got the same aspect ratio so i don't get why this is happening.

    Component settings:
    PPU: 16
    Ref: 384x216
    Upscale Render: True
    Crop XY: True
    Stretch: False

    Help would be much appreciated, thanks!
     
  2. agelvik

    agelvik

    Joined:
    Nov 6, 2015
    Posts:
    23
    Fixed it.
    Solution:
    If 1.7778 aspect ratio, disable "Crop".
    If anything else, enable "Crop".

    Note:
    I'm using two Pixel Perfect Camera components, one for general objects, one for UI.
    In addition to disabling Crop, I had to disable Upscale Render Texture as well. This fixed some weird visual glitches on the UI.

    This made me consider if I even need a second Pixel Perfect Camera...
     
    Tyrant7 likes this.