Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Easy way to display properties of Standard Shader in a new shader?

Discussion in 'Unity 5 Pre-order Beta' started by makeshiftwings, Feb 17, 2015.

  1. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    I have a shader that basically does one thing (clear the zbuffer for an object) and then does UsePass to use the Standard Shader. Is there an easy way to sort of "subclass" the Standard Shader and have all its properties and things show up? Or do I need to just copy and paste the Properties section from the standard shader source code?
     
  2. Deleted User

    Deleted User

    Guest

    I'm confused. When you say the Standard shader do you mean Unity's Standard shader or Alloy's Core shader?
     
  3. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    Yes, copy the Properties block; and you probably also want to use the same custom editor (so copy the CustomEditor statement too).
     
    insominx likes this.
  4. makeshiftwings

    makeshiftwings

    Joined:
    May 28, 2011
    Posts:
    3,350
    Yes I meant Unity 5's shader. Thanks Aras!
     
  5. Deleted User

    Deleted User

    Guest

    Ah. For some reason I thought this was a PM. Never mind. :p