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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Tinting with Vector Graphics

Discussion in 'Shader Graph' started by Lionmeow, Jul 16, 2023.

  1. Lionmeow

    Lionmeow

    Joined:
    May 23, 2019
    Posts:
    3
    In my URP shader graph shader, I have an unlit sprite shader. It's simple; I have a tint color and a sprite property. I sample the sprite, multiply it with the color, and pass it in as the base color.

    upload_2023-7-16_11-15-25.png

    While this does work with regular graphics, I'm trying to work with Vector Graphics. Currently, the shader does display properly when using a vector sprite, but the tint doesn't work; it just displays its original colors.
     
  2. FredMoreau

    FredMoreau

    Unity Technologies

    Joined:
    May 27, 2019
    Posts:
    115
    Hi @Lionmeow,

    can you share more details on the setup?

    I assume you have a Sprite Renderer to which you assigned a ShaderGraph based Material and a Sprite, but regarding the "Vector Sprite", is it something you imported with the SVG importer from com.unity.vectorgraphics?

    Also, what version of Unity and Shader Graph are you using?

    Thanks
     
  3. Lionmeow

    Lionmeow

    Joined:
    May 23, 2019
    Posts:
    3
    This is indeed on a Sprite Renderer with a Vector Graphics sprite.
    I'm using Unity 2022.1.0f1 with Shader Graph 13.1.8 and Vector Graphics 2.0.0-preview.21.