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.
Answer by Bunny83 · Jul 27, 2018 at 05:49 PM
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
Your answer
![](https://koobas.hobune.stream/wayback/20220612171622im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Get UV warped texture as another texture 0 Answers
Receive Shadow Mesh Renderer - Weird Effect 0 Answers
Tilemap Shader Glitch 0 Answers
HDRP and UMMORPG server 1 Answer