Hello. I followed this tutorial to make a post process material for some of my objects as there are certain points in my game where I’d like them to glow so the player knows that’s the next step.
and the code used for the “neighbouring pixels” node is available on the hyperlink of the tutorial I followed.
I just would like to know if there’s a way to not have the outline shown if the object is occluded behind another object. I followed another thread on here, but that didn’t work for me. Any help would be appreaciated!
You need to set the custom depth mask of the occluder to 38 for it to work.
My small box has the custom mask set to 1 and color to red
The wall that covers it is set to 38.
I didn’t download a shader for it, I just followed the tutorial and made a material, but thanks I’ll try your way. I’m now also having another problem where the glow I’ve added isn’t working:
It’s a max of the custom stencil mask (R) and the neighbouring pixel. Look in the shader.
It has some extra clamps to limit it to the 0-255 scale of the custom buffer.