[Bf-blender-cvs] [d1b86927495] greasepencil-object: GPencil: Use opacity in Glow blend equation
Antonio Vazquez
noreply at git.blender.org
Mon Feb 17 17:34:19 CET 2020
Commit: d1b869274950223001fb6e8a1f2513890fe88ed6
Author: Antonio Vazquez
Date: Mon Feb 17 17:34:11 2020 +0100
Branches: greasepencil-object
https://developer.blender.org/rBd1b869274950223001fb6e8a1f2513890fe88ed6
GPencil: Use opacity in Glow blend equation
===================================================================
M source/blender/draw/engines/gpencil/gpencil_shader_fx.c
M source/blender/draw/engines/gpencil/shaders/gpencil_vfx_frag.glsl
===================================================================
diff --git a/source/blender/draw/engines/gpencil/gpencil_shader_fx.c b/source/blender/draw/engines/gpencil/gpencil_shader_fx.c
index 98a7d2e6bd1..2d222df3ac8 100644
--- a/source/blender/draw/engines/gpencil/gpencil_shader_fx.c
+++ b/source/blender/draw/engines/gpencil/gpencil_shader_fx.c
@@ -466,7 +466,7 @@ static void gpencil_vfx_glow(GlowShaderFxData *fx, Object *UNUSED(ob), gpIterVfx
grp = gpencil_vfx_pass_create("Fx Glow V", state, iter, sh);
DRW_shgroup_uniform_vec2_copy(grp, "offset", (float[2]){-fx->blur[1] * s, fx->blur[1] * c});
DRW_shgroup_uniform_vec3_copy(grp, "threshold", (float[3]){-1.0f, -1.0f, -1.0f});
- DRW_shgroup_uniform_vec4_copy(grp, "glowColor", (float[4]){1.0f, 1.0f, 1.0f, 1.0f});
+ DRW_shgroup_uniform_vec4_copy(grp, "glowColor", (float[4]){1.0f, 1.0f, 1.0f, fx->glow_color[3]});
DRW_shgroup_uniform_bool_copy(grp, "glowUnder", (fx->flag & FX_GLOW_USE_ALPHA) != 0);
DRW_shgroup_uniform_bool_copy(grp, "firstPass", false);
DRW_shgroup_uniform_int_copy(grp, "blendMode", fx->blend_mode);
diff --git a/source/blender/draw/engines/gpencil/shaders/gpencil_vfx_frag.glsl b/source/blender/draw/engines/gpencil/shaders/gpencil_vfx_frag.glsl
index 6bb339b159a..504fa6a8fb6 100644
--- a/source/blender/draw/engines/gpencil/shaders/gpencil_vfx_frag.glsl
+++ b/source/blender/draw/engines/gpencil/shaders/gpencil_vfx_frag.glsl
@@ -200,7 +200,7 @@ void main()
if (!firstPass) {
fragColor.a = clamp(1.0 - dot(fragRevealage.rgb, vec3(0.333334)), 0.0, 1.0);
- blend_mode_output(blendMode, fragColor, 1.0, fragColor, fragRevealage);
+ blend_mode_output(blendMode, fragColor, glowColor.a, fragColor, fragRevealage);
}
}
More information about the Bf-blender-cvs
mailing list