[Bf-blender-cvs] [300152c7d4a] greasepencil-object: GPencil: More tweaks to default parameters for Glow VFX

Antonio Vazquez noreply at git.blender.org
Mon Feb 17 17:42:25 CET 2020


Commit: 300152c7d4aca59e43451464c23b9ac7aa3c9143
Author: Antonio Vazquez
Date:   Mon Feb 17 17:42:19 2020 +0100
Branches: greasepencil-object
https://developer.blender.org/rB300152c7d4aca59e43451464c23b9ac7aa3c9143

GPencil: More tweaks to default parameters for Glow VFX

===================================================================

M	source/blender/draw/engines/gpencil/gpencil_shader_fx.c
M	source/blender/shader_fx/intern/FX_shader_glow.c

===================================================================

diff --git a/source/blender/draw/engines/gpencil/gpencil_shader_fx.c b/source/blender/draw/engines/gpencil/gpencil_shader_fx.c
index 2d222df3ac8..4376e79585b 100644
--- a/source/blender/draw/engines/gpencil/gpencil_shader_fx.c
+++ b/source/blender/draw/engines/gpencil/gpencil_shader_fx.c
@@ -465,6 +465,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_int_copy(grp, "sampCount", max_ii(1, min_ii(fx->samples, fx->blur[0])));
   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, fx->glow_color[3]});
   DRW_shgroup_uniform_bool_copy(grp, "glowUnder", (fx->flag & FX_GLOW_USE_ALPHA) != 0);
diff --git a/source/blender/shader_fx/intern/FX_shader_glow.c b/source/blender/shader_fx/intern/FX_shader_glow.c
index 6b23afb142f..8924a1ab8b9 100644
--- a/source/blender/shader_fx/intern/FX_shader_glow.c
+++ b/source/blender/shader_fx/intern/FX_shader_glow.c
@@ -42,7 +42,7 @@ static void initData(ShaderFxData *md)
   ARRAY_SET_ITEMS(gpfx->select_color, 0.0f, 0.0f, 0.0f);
   copy_v2_fl(gpfx->blur, 50.0f);
   gpfx->threshold = 0.1f;
-  gpfx->samples = 16;
+  gpfx->samples = 8;
 }
 
 static void copyData(const ShaderFxData *md, ShaderFxData *target)



More information about the Bf-blender-cvs mailing list