Search Unity

Line Renderer color gradient

Discussion in 'Universal Render Pipeline' started by Epsilon_Delta, Feb 15, 2020.

  1. Epsilon_Delta

    Epsilon_Delta

    Joined:
    Mar 14, 2018
    Posts:
    258
    Hello,

    I would like to know, if it is possible to make my custom material, using shader created in shader graph, work with Line Renderer color property. It does not seem to work out of the box.
     
  2. Epsilon_Delta

    Epsilon_Delta

    Joined:
    Mar 14, 2018
    Posts:
    258
    I figured it out, for anyone with the same problem: the LineRenderer's color property affects Vertex Color and there is a Vertex Color node in Shader Graph. Multiply (or do whatever you want) your color with this Vertex Color node and it should be working.
     
    ysnrik, shibi2017, sqallpl and 7 others like this.
  3. AlfieBooth

    AlfieBooth

    Joined:
    Dec 2, 2013
    Posts:
    31
    Thank you!
     
  4. Be-Rad

    Be-Rad

    Joined:
    Feb 5, 2009
    Posts:
    34
    This saved me a bunch of time. Thanks for answering your own question!
     
    Epsilon_Delta likes this.