Fix T45737: Vertex colors show washed-out
Blender-Internal and GLSL-nodes missed converting sRGB to linear color.
This commit is contained in:
parent
46d275b626
commit
3633499f4e
Notes:
blender-bot
2023-02-14 08:47:25 +01:00
Referenced by issue #45737, BI: Washed out vertex color from material node
|
@ -149,6 +149,7 @@ void geom(vec3 co, vec3 nor, mat4 viewinvmat, vec3 attorco, vec2 attuv, vec4 att
|
|||
uv_attribute(attuv, uv);
|
||||
normal = -normalize(nor); /* blender render normal is negated */
|
||||
vcol_attribute(attvcol, vcol);
|
||||
srgb_to_linearrgb(vcol, vcol);
|
||||
vcol_alpha = attvcol.a;
|
||||
frontback = (gl_FrontFacing)? 1.0: 0.0;
|
||||
}
|
||||
|
|
|
@ -91,7 +91,7 @@ static void node_shader_exec_geom(void *data, int UNUSED(thread), bNode *node, b
|
|||
}
|
||||
}
|
||||
|
||||
copy_v3_v3(out[GEOM_OUT_VCOL]->vec, scol->col);
|
||||
srgb_to_linearrgb_v3_v3(out[GEOM_OUT_VCOL]->vec, scol->col);
|
||||
out[GEOM_OUT_VCOL]->vec[3] = scol->col[3];
|
||||
out[GEOM_OUT_VCOL_ALPHA]->vec[0] = scol->col[3];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue