Search Unity

Realtime Ambient Occlusion on Different Screen Resolutions

Discussion in 'Image Effects' started by GM_O, Jun 21, 2021.

  1. GM_O

    GM_O

    Joined:
    Apr 30, 2021
    Posts:
    7
    Hello everybody,

    I have a question about the realtime ambient occlusion effect of the post-processing stack v2 with the built-in render pipeline.
    Edit: Unity 2020.3.12f1, Post Processing 3.1.1

    When selecting a fixed resolution in the editor's game preview, I get different results depending on which resolution I pick: The larger the resolution, the thinner the ambient occlusion effect becomes.

    UnscaledFHD.png Unscaled4K.png

    This behavior also carries over to screenshots I take via
    ScreenCapture.CaptureScreenshot()
    .

    Taking a closer look, I realized that the "thickness" measured in screen pixels actually does not change at all. What varies is just the thickness relative to the screen resolution.
    (see red bars of equal pixel length; please correct me if I'm wrong)

    Comparison.png

    Now my questions are:

    1. Is this behavior intended?
    (I was expecting AO to be applied relative to the screen size, but it seems to be of a fixed pixel size)

    2. Is it limited to the editor, or will it behave the same in the build version?
    If the latter is the case: Assume that I want a uniform effect that is independent of the screen resolution, then I would have to adjust the post processing values depending on screen resolution, right?

    Thanks in advance!
     
    Last edited: Jun 21, 2021
    MattDavis and apkdev like this.