Search Unity

MaterialPropertyDrawer toggle for Render Setup values

Discussion in 'Shaders' started by jesta, Feb 12, 2014.

  1. jesta

    jesta

    Joined:
    Jun 19, 2010
    Posts:
    294
    Hi,

    I'm trying to enable/disable ZWrite with a MaterialPropertyDrawer. In the documentation, there are examples with blend modes, which are also Render Setup values. However, it seems we can only use the toggle defines inside the CGPROGRAM blocks.

    So how can I change the value of ZWrite, Blend, ZTest, etc with MaterialPropertyDrawers?

    Thanks!
     
  2. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    Bump.
    An example would be really useful.