Does anyone know why Stencil buffers in shaders stopped working in unity 2018?

Stencil buffers were working fine in unity 2017 etc. Once upgraded to 2018 suddenly they don’t function anymore.

Stencil { Ref 1 Comp Always Pass Replace }

And

Stencil{ Ref 1 Comp Equal }

do not want to communicate anymore!!!

Any help is much appreciated.

Well, I have Unity 2018.1.3f1 and my stencil shaders do still work. However keep in mind that the stencil buffer is already used by Unity in the default and lighting passes when using deferred lighting. You can read about that over here. Just read the section above the examples about the “Deferred rendering path”.

Since you don’t include any information about the purpose of your shaders and which rendering path you’re using (and you don’t want to give more information) we can’t help you any further. All i can say i just tested my old silhouette shader and it still works with the forward rendering path