docs.unity3d.com
    Show / Hide Table of Contents

    Enum UserStencilUsage

    Stencil bit exposed to user and not reserved by HDRP. Note that it is important that the Write Mask used in conjunction with these bits includes only this bits. For example if you want to tag UserBit0, the shaderlab code for the stencil state setup would look like:

    WriteMask 64 // Value of UserBit0 Ref 64 // Value of UserBit0 Comp Always Pass Replace

    Or if for example you want to write UserBit0 and zero out the UserBit1, the shaderlab code for the stencil state setup would look like:

    WriteMask MyWriteMask // with MyWriteMask define in C# as MyWriteMask = (UserStencilUsage.UserBit0 | UserStencilUsage.UserBit1) Ref MyRef // with MyRef define in C# as MyRef = UserStencilUsage.UserBit0 Comp Always Pass Replace

    Namespace: UnityEngine.Rendering.HighDefinition
    Syntax
    public enum UserStencilUsage

    Fields

    Name Description Value
    UserBit0

    User stencil bit 0.

    UserBit1

    User stencil bit 1.

    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023