Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Shader with Ambient Occlusion value higher than 1 doesn't have effect after upgrading to 2021.3

Discussion in 'Universal Render Pipeline' started by mbrmj, May 18, 2022.

  1. mbrmj

    mbrmj

    Joined:
    May 12, 2020
    Posts:
    8
    Hi,

    I have upgraded my URP project from 2020.3 to 2021.3. When I opened the project, I noticed some objects are darkened. They were bright in the previous version.

    After investigation, I found that these darkened objects have a shader (that I have created in shader graph) with Ambient Occlusion value larger than 1 (like 4 and 7).
    In the previous version, changing the AO to a value larger than 1 still changes the object's color by making it more brighter. But in this new version, changing AO value to any value larger than 1 has the same effect as value 1.

    Is this a bug? I hope it works the same as the previous version.
    I did a workaround to my shader -as for now- to make the objects look bright and vivid.

    Thanks.
     
  2. mbrmj

    mbrmj

    Joined:
    May 12, 2020
    Posts:
    8
    Changing the Rendering Path from Forward to Deferred has solved the issue! By selecting Deferred, now the AO value in the shadergraph can be affected by values larger than 1.

    I assume there is a bug with Forward Rendering Path. Please fix it if it is really a bug.
     
    Last edited: May 19, 2022
  3. mbrmj

    mbrmj

    Joined:
    May 12, 2020
    Posts:
    8
    I also found that building the application for Windows standalone will have the same issue as above even when using Deferred rendering path although there isn't any issue when running the game on the editor. Moreover the scene doesn't have environment ambient lights. It looks dark. The android build doesn't have this issue.

    Is this a bug? or I missed something.
    Appreciated.
     
  4. mbrmj

    mbrmj

    Joined:
    May 12, 2020
    Posts:
    8
    Regarding the last comment, I have managed to resolve the issue by replacing my current URP profiles with the URP profiles created in a new v2021.3 project. Now the Windows Standalone build has the exact light settings that I'm having in the editor.