Search Unity

Question Zwrite Off

Discussion in 'Shader Graph' started by tasticad, Nov 17, 2019.

  1. tasticad

    tasticad

    Joined:
    Dec 4, 2017
    Posts:
    10
    Hello,

    I'm using the LWRP in Unity 2019.2.11.

    I'm creating a shader with the shader graph but I need to disable its Depth buffer.
    Is there a way either in the shader graph itself or maybe in one of the Custom Renderer Features??

    Thanks in advance for the good help
     
  2. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    3,276
    Z writing is controlled by the master node.
    If its not a option to select you can not change it via the Shader Graph.
    You can make a copy if the generated shader and change it manually.
     
    tasticad likes this.
  3. tasticad

    tasticad

    Joined:
    Dec 4, 2017
    Posts:
    10
    Thanks fffMalzbier, didn't know I could copy/paste from the master node :)

    It would be a good thing though, to have this option available.
     
    Last edited: Nov 18, 2019
  4. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    3,276
    To view the Generated Shader code , right click on the master node and select "Show Generated Code".
    Then you can Make a new "non Shadergraph shader" and paste everything into that new file.
     
    tasticad likes this.
  5. tasticad

    tasticad

    Joined:
    Dec 4, 2017
    Posts:
    10
    Yep, thanks fffMalziber.

    (my last comment was about a Zwrite option on the Master node, which would be handy)
     
    Punky07Dev and Robiwan like this.