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.

Ambient Occlusion and GPU instanced mesh particles

Discussion in 'Image Effects' started by Niiilsen, Jun 10, 2020.

  1. Niiilsen


    Aug 26, 2012
    I'm having a problem with ambient occlusion not working as I want on gpu instanced mesh particles.

    I'm using the first shader example from to spawn a bunch of mesh smoke particles with GPU instancing enabled in the rendering module. It renders fine, but when post processing AO renders, it seems to calculate the smoke wrong(position and rotation offset). It also shows the AO of objects behind the smoke through the smoke.

    Here are a couple of pictures showing the problem:
    1. AO of elements in the background show through the smoke

    2. Ambient occlusion turned off:

    If I render the smoke on transparency queue it ignores ao completely, so that's not an option.

    Anyone have a solution to this issue?

    - Using Unity 2018.4.16f1 with forward rendering