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

Question SSAO renders on top of render objects?

Discussion in 'Universal Render Pipeline' started by bh4786, Oct 15, 2021.

  1. bh4786

    bh4786

    Joined:
    May 24, 2017
    Posts:
    13
    I was using a two camera system for my first person game but I saw this tutorial:


    This solution works really well. However, it seems as if the ambient occlusion is rendering on top of the player's weapon. How can I fix this?
     
  2. orville_redenbacher

    orville_redenbacher

    Joined:
    Sep 9, 2018
    Posts:
    34
    Having the exact same problem, also because of that video lol
     
  3. Sky77

    Sky77

    Joined:
    Jan 30, 2014
    Posts:
    171
    We have the same exact problem. I think it's a bug and it was never fixed...
     
  4. orville_redenbacher

    orville_redenbacher

    Joined:
    Sep 9, 2018
    Posts:
    34
    I was able to fix it by changing Gun Opaque to use the BeforeRenderingSkybox event. Performance as decreased but ambient occlusion works as expected.
     
  5. swantonb

    swantonb

    Joined:
    Apr 10, 2018
    Posts:
    150
    Not sure if I'm doing something wrong but there's no way I get ambient occlusion on the objects that are rendered with the render objects feature. I can indeed get rid of the AO that is rendering from the environment, through the gun, by ticking "After Opaque" on the SSAO render feature here:
    https://gyazo.com/f00cfcf1e598ee0318c6248378aceeda

    But that is not as important as getting AO to the weapon itself, and i've tried setting the gun opaque render objects feature to every event possible. Are you sure you're getting AO on the weapon @orville_redenbacher ?