Avoid super-luminous pixels

The color-matrix shader was creating pixels with r,g,b > a in
some cases, which leads to unexpected test failures. In particular
this as visible the opacity render node test for opacity 0.
This commit is contained in:
Matthias Clasen 2017-10-19 15:15:13 +02:00
parent 4808829352
commit b564dd853c
4 changed files with 1 additions and 2 deletions

View File

@ -22,8 +22,7 @@ color_matrix (vec4 color, mat4 color_matrix, vec4 color_offset)
color = clamp(color, 0.0, 1.0);
/* premultiply */
if (color.a != 0.0)
color.rgb *= color.a;
color.rgb *= color.a;
return color;
}