Search Unity

Stencil comparision

Discussion in 'Shaders' started by elpie89, Oct 16, 2017.

  1. elpie89

    elpie89

    Joined:
    Jun 30, 2014
    Posts:
    32
    Can I set the stencil comparision with a MaterialPropertyblock?
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,338
    To my knowledge, no.

    Nothing outside of a CGPROGRAM block can be modified by the MaterialPropertyBlock. So anything like Stencil[_Value] or ZWrite[_Value] won't work.