Search Unity

Question 2021.1.3f1 - URP, SSAO does not work in game window

Discussion in 'Universal Render Pipeline' started by sergiusz308, Apr 19, 2021.

  1. sergiusz308

    sergiusz308

    Joined:
    Aug 23, 2016
    Posts:
    235
    Hello there - after enabling SSAO feature on the Forward Renderer setttings, it's visible in the game window, but does not work in the game window.

    upload_2021-4-19_16-23-51.png



    Camera has HDR enabled, Depth texture enabled.

    I am usiing Cinemachine virtual cameras.

    Any suggestions highly appreciated, since I have no clue what's going.

    Thanks,
    S.
     
  2. Elvar_Orn

    Elvar_Orn

    Unity Technologies

    Joined:
    Dec 9, 2019
    Posts:
    162
    Hey sergiusz308,

    When you wrote

    Did you mean Scene Window and Game Window?

    As a first guess, have you checked if your camera is using the renderer with the SSAO feature active?
    If you open the Frame Debugger, do you see the SSAO draw calls?
     
  3. sergiusz308

    sergiusz308

    Joined:
    Aug 23, 2016
    Posts:
    235
    Hey Elvar_Orn - first of all: thanks for looking into this!.

    Sorry for the typo, yes I meant it works fine in the Scene View and nothing is visible in the Game View.

    I have single main camera, referenced by several virtual cameras (setup screenshots below).

    I checked frame debugger and there's strange thing - as you can see effect is applied to a different portions of the view in game view and in the scene view. Here's the shot from the SSAO pass (red arrows pointing differences):

    upload_2021-4-19_16-56-16.png

    My renderer setup (settings):

    upload_2021-4-19_16-52-34.png

    Camera setup:

    upload_2021-4-19_16-53-37.png
     
  4. Elvar_Orn

    Elvar_Orn

    Unity Technologies

    Joined:
    Dec 9, 2019
    Posts:
    162
    Interesting.

    Two things before asking you for a repro:
    1. I noticed that your scene view is in Orthographic (Iso) mode, is it also fine when using a projection camera there?
    2. Can you show me the Depth + Normals textures when looking at the scene with the Frame Debugger?
     
  5. sergiusz308

    sergiusz308

    Joined:
    Aug 23, 2016
    Posts:
    235
    ad 1. No, it's perspective, but with a low FOV value
    ad 2. Well, examining this closer I noticed followed:

    - if camera is very close, effect is noticable:

    upload_2021-4-19_18-33-29.png

    Depth is black, Normals:

    upload_2021-4-19_18-35-50.png

    - then it's further away, it's not visible:

    upload_2021-4-19_18-33-56.png

    upload_2021-4-19_18-37-3.png

    camera zoom is done using cinemachine freelook rig.
     

    Attached Files: