Search Unity

Standard shader with vertex colors

Discussion in 'Shaders' started by defaxer, Apr 5, 2015.

  1. jvo3dc

    jvo3dc

    Joined:
    Oct 11, 2013
    Posts:
    1,372
    We had a small issue with a model with small triangles and MSAA. The interpolation of the vertex colors is by subpixel now, which can lead to some artefacts. To set the interpolation by pixel instead, change the register that contains the input color for the pixel shader to TEXCOORD10_centroid instead of COLOR.
     
    Last edited: Oct 19, 2018
  2. Tzan

    Tzan

    Joined:
    Apr 5, 2009
    Posts:
    702
    Does the shader created by the graph system have a Detail Texture slot?
     
  3. MadDevil

    MadDevil

    Joined:
    Nov 4, 2014
    Posts:
    4
    @bossa_dave, can you show us how you did it in shader graph?


    -Thanks :)
     
  4. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,366
    just use the vertex color node in shadergraph
     
  5. d3gator

    d3gator

    Joined:
    May 28, 2009
    Posts:
    21
    Hey guys, the shader is awesome.
    Where i can download latest version?
     
  6. willgoldstone

    willgoldstone

    Unity Technologies

    Joined:
    Oct 2, 2006
    Posts:
    695
    Hey all

    I have been chatting with @Tzan and he prompted me to check on this from our Graphics team - regarding official solutions for vertex colors. The answer is that basically - long story short this is now roadmapped and part of SRP and Shader Graph. We will begin work on it once we've stabilized the SRPs around march and expect to ship support for it in the fall.
    We just have so many other things that beat it priority wise sadly - but I wanted to give you the honest answer that'll allow you to plan ahead. I'm told it involves C++ level changes that we can't just fix in C# land so sadly it's a waiting game on this one - I'd love to give you a workaround but I don't have a solid supported solution for you.

    Hope that helps,

    Will
     
    Player7, Alverik and Lars-Steenhoff like this.
  7. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    2,070
    good news!
    While your at it, please also make vertex position animation and vertex color animation a possibility in the animator

    and also the abilty to import vertex animation from maya
     
  8. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,383
    Good to hear, it's like you guys do read the forums, just a shame the implementation timeline is out of sync with our requests :)

    Honestly vertex coloring painting/shaders should have come supported out of the box with Unity for years already as it's very useful for games..anyway SRP/Shader graph supporting in the future is good, hopefully probuilder tools improves on the tooling for it aswel thanks.
     
    jrumps and Alvarezmd90 like this.
  9. wimvanhenden

    wimvanhenden

    Joined:
    Dec 21, 2018
    Posts:
    1
    Just for Unity 2018 and up in the file UnityVC.cginc change all references:

    half4 tangentToWorldAndPackedData[3]

    to

    float4 tangentToWorldAndPackedData[3]

    And it works fine.