Twil75
1
Hi
I would like to set the stencil ReadMak value as parameter of my shader, but unity say compilation error.
I set the Ref value as param and it works good, but impossible to set the ReadMask or WriteMask
Exemple:
…
Properties
{
_StencilRef (“Stencil Ref”, Float) = 0
_StencilMask (“Stencil Mask”, Float) = 0
}
…
Stencil
{
Ref [_StencilRef] //Work good
ReadMask [_StencilMask] //Don’t work !!
WriteMask [_StencilMask] //Don’t work !!
Comp NotEqual
}
…
An idea ?
Thanks
Laurent
Ever get this figured out?
This is pretty late but you can do something like this:
Properties
{
[IntRange] _ReadMask ("ReadMask [0:255]", Range( 0 , 255)) = 1
...
}
...
Stencil
{
Ref [_StencilRef]
ReadMask [_ReadMask]
...
}
...