- Home /
Adding a Stencil to Particle Standard Surface shader
I bought a smoke particle effect from the asset store which uses the "Particles/Standard Surface" shader.
My game uses a fog of war effect that is handled by adding a Stencil Mask. I've been able to modify other shaders (ones from purchases assets) with this:
Stencil
{
Ref 1
Comp equal
}
which works to hide other effects. I add this within the SubShader just after the first list of properties. However, when I add that piece of code to the "Particles/Standard Shader" (found a source copy here) the shader doesn't compile How can I add this stencil logic to this shader? I've seen some recommendations to create my own shader but there must be more to it than just creating a new "Standard Surface Shader" since that hasn't worked.
Adding a Stencil to Particle Standard Surface shader
Your answer
Follow this Question
Related Questions
Stencil buffer on mobile 0 Answers
Stencil Shader no longer working with Lightweight Render Pipeline 1 Answer
Problem with transparency and stencil shader 1 Answer
Shader that renders pixel with highest alpha value? 0 Answers
Multi-shader Stencil Buffer not working as expected,Multi-shader Stencil not working as expected 0 Answers