Search Unity

Question How to add SSAO in custom Shader Graph?

Discussion in 'Shaders' started by MustEat, Jan 7, 2023.

  1. MustEat

    MustEat

    Joined:
    Jul 15, 2018
    Posts:
    18
    Does anyone have an example image of a custom shader graph which successfully implemented SSAO? All features except SSAO are working on my shader.
    • URP 14.0
    • Unity 2022.2
    • I added the _SCREEN_SPACE_OCCLUSION Boolean keyword and the _CameraNormalsTexture property to the shader
    • In Shader Graph I added ScreenPosition UV out to a Custom Function as per other commenters on the forums...
    • In frame debugger, I am seeing the SSAO pass and it does render camera depth normals, but they are the straight edges of my voxel cubes, not an AO effect.
    What am I missing and how do I generate the AO to multiply into the output?
     
    Tamago-Jam likes this.