Search Unity

Question How can I add AO Map to shader graph shader?

Discussion in 'Shader Graph' started by Zaine7673, Jul 11, 2020.

  1. Zaine7673

    Zaine7673

    Joined:
    Feb 15, 2018
    Posts:
    238
    I've got a simple shader graph shader that takes two textures and normal maps and blends them based on a mask.

    I'm trying to now add a ambient occlusion map to them.

    I can see that the Lit master node has a AmbientOcclsuion slot but when I take a Sampler 2D Texture (multiply it by a float) and then put that into the AO slot on the master node, nothing happens.

    I've tried using a PBR node also but no results.

    Can anyone help me understand why it is not working please?

    Also what's the difference between Lit shader and PBR they seem very similar to me besides a few options.

    Thanks,

    upload_2020-7-11_21-9-5.png
     
  2. daniellye

    daniellye

    Joined:
    Oct 11, 2019
    Posts:
    6
    Based on an answer from a different post, it's because Ambient Occlusion does exactly what it says in its name: it occludes ambient lighting based on a mask. So if your scene does not have any baked indirect lighting, the AO may not come out as expected. Perhaps that's the case for you?
     
  3. Zaine7673

    Zaine7673

    Joined:
    Feb 15, 2018
    Posts:
    238
    meh i gave up on this. I've got bounce light on 1 so not sure. maybe one day i'll figure it out lol. thanks anyway though