Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

TextMeshPro VertexColor wrong in linear color space.

Discussion in 'UGUI & TextMesh Pro' started by tspk91, May 14, 2020.

  1. tspk91

    tspk91

    Joined:
    Nov 19, 2014
    Posts:
    131
    If using linear as the project color space, the selected color is displayed wrong. The color is already wrong before entering the shader, so I guess it is some serialization/property/mesh error.

    I have fixed it by modifying the shader code and appying gamma correction in the fragment shader:
    Code (CSharp):
    1. faceColor.rgb *= pow(input.color.rgb, 2.2); //gamma correction
    Is this intended?
     
    Last edited: May 14, 2020
    Renardjojo likes this.