You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is often a need to set some property based on the value of another property. A common example: adjusting blend settings based on the desired blending mode or setting stencil refs in a user-friendly way (like for outlines).
// properties
[Toggle(OUTLINE_ENABLED)]_OutlineEnabled("Enable Outline", Int) = 0UI_SetStencilOp("Stencil Op Settier %SetProp((OUTLINE_ENABLED), _StencilOp, 2, 0)", Int) = 0
[HideInInspector]_StencilOp("Stencil Op", Float) = 0
// below in the pass
Stencil
{
Ref 69
Comp Always
Pass [_StencilOp]
}
// below in the CGPROGRAMfloat _StencilOp;
This will set the Stencil Pass op (via the _StencilOp property) to 2 (Replace) if the OUTLINE_ENABLED keyword is set, or to 0 (Keep) if the keyword is not set
The text was updated successfully, but these errors were encountered:
There is often a need to set some property based on the value of another property. A common example: adjusting blend settings based on the desired blending mode or setting stencil refs in a user-friendly way (like for outlines).
The signature should look like this
Example:
This will set the Stencil
Pass
op (via the_StencilOp
property) to2
(Replace) if theOUTLINE_ENABLED
keyword is set, or to0
(Keep) if the keyword is not setThe text was updated successfully, but these errors were encountered: