- Home /
vertex colors are slightly lighter in editor compared to webgl builds
vertex colors, in vertex colored meshes and also in lineRenderer lines. Are lighter in editor, darker on webgl build. I'm using a very basic alpha blended vertex color shader. The shader is fine in other projects and the same meshes are fine in other projects. By 'fine' I mean, they look the same when I compare Unity Editor and webgl builds. This problem doesn't seem to affect sprites and textures, is just making the vertex colors slightly lighter (washed out) for vertex colors. I can see the same in the LineRenderer. I set the same color for start and end of the line, and the color of the line in the game window is lighter than the one I set in the LineRender options.
Answer by arnaldoGaroto · Sep 15, 2017 at 11:08 AM
to answer my own question, the issue was the color space needs to be gamma. In Unity 5.6 the Color Space setting is in the Player Settings window (menu: Edit > Project Settings > Player).
In Unity 5.4.3 there's no way to change that in editor, so I had to manually edit ProjectSettings.asset with a text editor and set m_ActiveColorSpace: 0 (I don't know how/why m_ActiveColorSpace was set to 1)
Your answer
Follow this Question
Related Questions
(noob) Vertex Color from 3dsmax 0 Answers
Mesh.colors doesn't work even though colors are passed correctly to the array 1 Answer
In which format does Unity read vertex colors from .obj files? 1 Answer
Vertex colors are being stripped after build 1 Answer
Best practice to change vertex color on a large amount of quads? 1 Answer