[Bf-blender-cvs] [c2d56d7caa5] greasepencil-refactor: Cleanup: GPencil: CamelCase for uniform and fix a wrong comparison
Clément Foucault
noreply at git.blender.org
Thu Dec 19 01:31:05 CET 2019
Commit: c2d56d7caa595df771f5fd74d6286b64cb51217d
Author: Clément Foucault
Date: Wed Dec 18 23:09:51 2019 +0100
Branches: greasepencil-refactor
https://developer.blender.org/rBc2d56d7caa595df771f5fd74d6286b64cb51217d
Cleanup: GPencil: CamelCase for uniform and fix a wrong comparison
===================================================================
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 95f69b1467e..38f4e831dd7 100644
--- a/source/blender/draw/engines/gpencil/gpencil_shader_fx.c
+++ b/source/blender/draw/engines/gpencil/gpencil_shader_fx.c
@@ -1128,8 +1128,8 @@ static void gpencil_vfx_colorize(ColorizeShaderFxData *fx, Object *UNUSED(ob), g
DRWState state = DRW_STATE_WRITE_COLOR;
grp = gpencil_vfx_pass_create("Fx Colorize", state, iter, sh);
- DRW_shgroup_uniform_vec3_copy(grp, "low_color", fx->low_color);
- DRW_shgroup_uniform_vec3_copy(grp, "high_color", fx->high_color);
+ DRW_shgroup_uniform_vec3_copy(grp, "lowColor", fx->low_color);
+ DRW_shgroup_uniform_vec3_copy(grp, "highColor", fx->high_color);
DRW_shgroup_uniform_float_copy(grp, "factor", fx->factor);
DRW_shgroup_uniform_int_copy(grp, "mode", fx->mode);
DRW_shgroup_call_procedural_triangles(grp, NULL, 1);
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 a7a3c4a6a27..3449e439c99 100644
--- a/source/blender/draw/engines/gpencil/shaders/gpencil_vfx_frag.glsl
+++ b/source/blender/draw/engines/gpencil/shaders/gpencil_vfx_frag.glsl
@@ -35,8 +35,8 @@ void main()
#elif defined(COLORIZE)
-uniform vec3 low_color;
-uniform vec3 high_color;
+uniform vec3 lowColor;
+uniform vec3 highColor;
uniform float factor;
uniform int mode;
@@ -65,10 +65,10 @@ void main()
fragColor.rgb = mix(fragColor.rgb, sepia_mat * fragColor.rgb, factor);
break;
case MODE_DUOTONE:
- fragColor.rgb = luma * ((luma <= factor) ? low_color : high_color);
+ fragColor.rgb = luma * ((luma <= factor) ? lowColor : highColor);
break;
case MODE_CUSTOM:
- fragColor.rgb = mix(fragColor.rgb, luma * low_color, factor);
+ fragColor.rgb = mix(fragColor.rgb, luma * lowColor, factor);
break;
case MODE_TRANSPARENT:
default:
@@ -133,7 +133,7 @@ void main()
vec3 col = texture(colorBuf, uv).rgb;
if (threshold.x > -1.0) {
if (threshold.y > -1.0) {
- if (all(lessThan(vec3(0.05), abs(col - threshold)))) {
+ if (all(lessThan(abs(col - threshold), vec3(0.05)))) {
weight = 0.0;
}
}
More information about the Bf-blender-cvs
mailing list