GPencil: Fix overlay blend mode creating inverted colors
This commit is contained in:
@@ -120,11 +120,13 @@ void blend_mode_output(
|
||||
color = mix(vec4(0.5), color, color.a * opacity);
|
||||
vec4 s = step(-0.5, -color);
|
||||
frag_revealage = frag_color = 2.0 * s + 2.0 * color * (1.0 - s * 2.0);
|
||||
frag_revealage = max(vec4(0.0), frag_revealage);
|
||||
break;
|
||||
case MODE_OVERLAY_SECOND_PASS:
|
||||
/* Reminder: Blending func is additive blend (dst.rgba + src.rgba).*/
|
||||
color = mix(vec4(0.5), color, color.a * opacity);
|
||||
frag_revealage = frag_color = (-1.0 + 2.0 * color) * step(-0.5, -color);
|
||||
frag_revealage = max(vec4(0.0), frag_revealage);
|
||||
break;
|
||||
case MODE_SUB:
|
||||
case MODE_ADD:
|
||||
|
||||
Reference in New Issue
Block a user