Search Unity

2D always uses SpriteRenderer color

Discussion in 'Universal Render Pipeline' started by CasualDutchman, Jan 16, 2020.

  1. CasualDutchman

    CasualDutchman

    Joined:
    Jan 20, 2016
    Posts:
    37
    I am not sure if it is fixed in a later version, I am using Unity 2019.2.3f1.
    When using the LWRP or URP 2D renderer, The SpiteRenderer always uses the Color property, even though the Vertex Color property is not used in the Shader Graph.

    Is this fixed in a later version?
    Is there a way around it?
     
  2. Shaunyowns

    Shaunyowns

    Joined:
    Nov 4, 2019
    Posts:
    328
    Hey @Casual_Dutchman, I'll send this post over for you to see if we can get a response!
     
  3. CasualDutchman

    CasualDutchman

    Joined:
    Jan 20, 2016
    Posts:
    37
    I want to use the color variable of the SpriteRenderer to get data to the shader. For example to use the red color to add an offset to my vertex animation. This still works as intended. The thing that bothers me now, is that the SpriteRenderer's color variable or the vertex color in the shader is automatically set to change the color. This is not the case outside the lwrp or urp.