Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Shader Graph Color Mask RG

Discussion in 'Shader Graph' started by MODev, Dec 20, 2019.

  1. MODev

    MODev

    Joined:
    Jul 30, 2013
    Posts:
    229
    Hi,
    I would like to make my shader write only to R and G channels. How can I achieve it? (can be even in 2019.3).
    In old way shaders that was easy because I had to only write ColorMask RG on SubShader space but now I cannot see any option like that.
    Btw, what's with Offset, ZWrite, ZTest etc? I cannot see those setups too.
     
  2. MODev

    MODev

    Joined:
    Jul 30, 2013
    Posts:
    229
    Probably there's nothing like that supposing that no one answered :(
     
  3. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,329
    Yep, not an option with Shader Graph currently. There’s no technical limitation preventing this, you can modify the shader code generated by the graph to add these for example, it’s just not something they’ve exposed yet. I believe some newer versions of the HDRP have a few render state options exposed on the material itself (like ZWrite), but they’ve not yet done the same for the URP that I know of.
     
    MODev likes this.
  4. MODev

    MODev

    Joined:
    Jul 30, 2013
    Posts:
    229
    Yep I can but I'm asset publisher so it makes that after every compatibility change I have to upgrade the shader for each rp and unity version separately which is very time consuming
     
  5. huwb

    huwb

    Joined:
    Oct 19, 2013
    Posts:
    24
    I would also use this feature so +1 from me.
     
  6. oobartez

    oobartez

    Joined:
    Oct 12, 2016
    Posts:
    163
    Same here - we would like to use Offset, ZWrite, ZTest as well as ColorMask and Culling with URP / Shader Graph.
     
    Last edited: Oct 12, 2020