Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Some material properties appear twice

Discussion in 'High Definition Render Pipeline' started by iSpiegelball, Feb 6, 2020.

  1. iSpiegelball

    iSpiegelball

    Joined:
    Jan 7, 2020
    Posts:
    14
    Hey guys!

    Using a shadergraph material I noticed that some properties are exposed twice to the user - once via the properties of the master node and once via the material dialogue of the inspector. For example: Surface Type, Rendering Pass Double-Sided etc...

    shadergraph.PNG material.PNG

    Now I am wondering how those properties are associated with each other. Early tests show that Surface Type in the material inspector overrides the settings on the shader graph master not - but not vice versa. Can somebody help me understanding this?
     
  2. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    672
    you are guessing right. The one in the inspector is supposed to overrides the one in the shadergraph.
    The same way a public variable set in the inspector on a monobehaviour script overrides the initial value set in the declaration of the variable in the script
     
  3. iSpiegelball

    iSpiegelball

    Joined:
    Jan 7, 2020
    Posts:
    14
    Thanks for clarification! I was confused because for example some properties (e.g. transparency writes motion vector) are only exposed if surface type is set to transparency in both places.