Excluding Layers / Ignore object on Unity SSAO ?

Hi,

I’m having a problem with Unity’s SSAO on excluding layers / ignore object that shouldn’t be rendered with SSAO. I use Unity chan shader for my character. Don’t ask me to adjust Min Z. I tried it and it’s bad (What if the character was far from camera ? Adjust Min Z? I don’t think so…)

This is the compassion screenshot,


With Unity SSAO, Sample Count High, Intensity 1, Radius 0.05, MinZ 0.01.


Without Unity SSAO, great for character, bad for environment…

And I also tried to tweak a little on Unity Chan shader and I found this and changed it from

"RenderType"="Opaque"
"Queue"="Geometry"
"LightMode"="ForwardBase"

to this

"RenderType"="Transparent"
"Queue"="Transparent"
"LightMode"="ForwardBase"


And it really works, SSAO now finally ignored character, but there’s still a problem. Depth of Field can’t see character / blur character anymore (if you see it, there’s some DoF cut on character’s body). And sometimes the background like to have a SSAO on character’s shirt / overlayed.

Thanks for the answers.

Hello wall, how are you ?
fine thanks, so what are you doing here ?
Just, talking to you as usual in every forum I guess…
Are you bumping ?
Mhm… I guess so…

SSAO is post processing, so it gets only the rendered Image. You can’t exclude objects from that (since the image is done)
You could take 2 cameras, one with ssao for the background and one without for your characters.

Can’t it be like Motion Blur that has exclude layer ? I know that with 2 cameras using clear flag works, but depth of field just wont work with it…