diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2020-03-30 19:18:37 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2020-03-30 19:23:36 +0300 |
commit | 100896e080bc6f09177fbf4aa6ad4b587bd95ed5 (patch) | |
tree | eac54c0d3fdd9da58661df1e06875c122dcab844 /source/blender/draw/engines/gpencil/shaders | |
parent | 6428da84ed37534014f6c85b141af67af951813d (diff) |
GPencil: Rename Overlay blend mode to Hard Light
Differential Revision: https://developer.blender.org/D7280
Diffstat (limited to 'source/blender/draw/engines/gpencil/shaders')
-rw-r--r-- | source/blender/draw/engines/gpencil/shaders/gpencil_common_lib.glsl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/draw/engines/gpencil/shaders/gpencil_common_lib.glsl b/source/blender/draw/engines/gpencil/shaders/gpencil_common_lib.glsl index 5155bfeab90..54b2369b32b 100644 --- a/source/blender/draw/engines/gpencil/shaders/gpencil_common_lib.glsl +++ b/source/blender/draw/engines/gpencil/shaders/gpencil_common_lib.glsl @@ -77,12 +77,12 @@ layout(std140) uniform gpLightBlock /* Must match eGPLayerBlendModes */ #define MODE_REGULAR 0 -#define MODE_OVERLAY 1 +#define MODE_HARDLIGHT 1 #define MODE_ADD 2 #define MODE_SUB 3 #define MODE_MULTIPLY 4 #define MODE_DIVIDE 5 -#define MODE_OVERLAY_SECOND_PASS 999 +#define MODE_HARDLIGHT_SECOND_PASS 999 void blend_mode_output( int blend_mode, vec4 color, float opacity, out vec4 frag_color, out vec4 frag_revealage) @@ -104,7 +104,7 @@ void blend_mode_output( color.a *= opacity; frag_revealage = frag_color = clamp(1.0 / max(vec4(1e-6), 1.0 - color * color.a), 0.0, 1e18); break; - case MODE_OVERLAY: + case MODE_HARDLIGHT: /* Reminder: Blending func is multiply blend (dst.rgba * src.rgba).*/ /** * We need to separate the overlay equation into 2 term (one mul and one add). @@ -122,7 +122,7 @@ void blend_mode_output( 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: + case MODE_HARDLIGHT_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); |