[Bf-blender-cvs] [7700117b62f] greasepencil-object: GPencil: Pass Glow color as vec4
Antonio Vazquez
noreply at git.blender.org
Mon Feb 17 17:27:58 CET 2020
Commit: 7700117b62fe17cdf524b8910dcb761a81940a58
Author: Antonio Vazquez
Date: Mon Feb 17 17:27:49 2020 +0100
Branches: greasepencil-object
https://developer.blender.org/rB7700117b62fe17cdf524b8910dcb761a81940a58
GPencil: Pass Glow color as vec4
===================================================================
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 fc21b6a1422..98a7d2e6bd1 100644
--- a/source/blender/draw/engines/gpencil/gpencil_shader_fx.c
+++ b/source/blender/draw/engines/gpencil/gpencil_shader_fx.c
@@ -435,7 +435,7 @@ static void gpencil_vfx_glow(GlowShaderFxData *fx, Object *UNUSED(ob), gpIterVfx
DRW_shgroup_uniform_vec2_copy(grp, "offset", (float[2]){fx->blur[0] * c, fx->blur[0] * s});
DRW_shgroup_uniform_int_copy(grp, "sampCount", max_ii(1, min_ii(fx->samples, fx->blur[0])));
DRW_shgroup_uniform_vec3_copy(grp, "threshold", ref_col);
- DRW_shgroup_uniform_vec3_copy(grp, "glowColor", fx->glow_color);
+ DRW_shgroup_uniform_vec4_copy(grp, "glowColor", fx->glow_color);
DRW_shgroup_uniform_bool_copy(grp, "glowUnder", false);
DRW_shgroup_uniform_bool_copy(grp, "firstPass", true);
DRW_shgroup_call_procedural_triangles(grp, NULL, 1);
@@ -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_vec3_copy(grp, "glowColor", (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_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 0f1f65d649f..6bb339b159a 100644
--- a/source/blender/draw/engines/gpencil/shaders/gpencil_vfx_frag.glsl
+++ b/source/blender/draw/engines/gpencil/shaders/gpencil_vfx_frag.glsl
@@ -142,7 +142,7 @@ void main()
#elif defined(GLOW)
-uniform vec3 glowColor;
+uniform vec4 glowColor;
uniform vec2 offset;
uniform int sampCount;
uniform vec3 threshold;
More information about the Bf-blender-cvs
mailing list