The Stencil Unlit shader is a simple color effect, with added support for the stencil buffer.
This video is mainly for Stencil Lit, but the same stencil concepts apply.
Parameters
Surface Options
- Surface Type - Toggle between Opaque and Transparent rendering.
- Render Face -Choose whether to render Front, Back, or Both faces
- Alpha Clip - Toggle whether the shader should apply the Alpha Clip Threshold.
- Alpha Clip Threshold - Pixels with final base color alpha values below this threshold will be culled if Alpha Clip is enabled.
Stencils
- Reference - Stencil ID value to compare with the existing stencil buffer value.
- Comparison - Comparison test to use between Reference value and existing stencil buffer value.
- Pass - What to do with the existing stencil buffer value if the stencil test passes.
- Fail - What to do with the existing stencil buffer value if the stencil test fails.
- Z-Fail - What to do with the existing stencil buffer value if the stencil test passes, but the z-test fails.
Unlit Properties
- Base Color - The albedo color of the object. The alpha channel may be used for transparency.
- Base Texture - Similar to Base Color, can be used to change the albedo color of the object.