Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/draw/engines/gpencil/shaders/gpencil_fill_frag.glsl')
-rw-r--r--source/blender/draw/engines/gpencil/shaders/gpencil_fill_frag.glsl6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/draw/engines/gpencil/shaders/gpencil_fill_frag.glsl b/source/blender/draw/engines/gpencil/shaders/gpencil_fill_frag.glsl
index d2cad4e44f7..1d57cdc4bcf 100644
--- a/source/blender/draw/engines/gpencil/shaders/gpencil_fill_frag.glsl
+++ b/source/blender/draw/engines/gpencil/shaders/gpencil_fill_frag.glsl
@@ -15,6 +15,7 @@ uniform int texture_mix;
uniform int texture_flip;
uniform float texture_opacity;
uniform int xraymode;
+uniform float layer_opacity;
uniform sampler2D myTexture;
uniform int texture_clamp;
@@ -66,6 +67,7 @@ void set_color(in vec4 color, in vec4 color2, in vec4 tcolor, in float mixv, in
ocolor = (flip == 0) ? mix(color, color2, factor) : mix(color2, color, factor);
}
}
+ ocolor.a *= layer_opacity;
}
void main()
@@ -115,15 +117,17 @@ void main()
}
/* mix with texture */
fragColor = (texture_mix == 1) ? mix(chesscolor, text_color, mix_factor) : chesscolor;
+ fragColor.a *= layer_opacity;
}
/* texture */
if (fill_type == TEXTURE) {
fragColor = (texture_mix == 1) ? mix(text_color, finalColor, mix_factor) : text_color;
+ fragColor.a *= layer_opacity;
}
/* pattern */
if (fill_type == PATTERN) {
fragColor = finalColor;
- fragColor.a = min(text_color.a, finalColor.a);
+ fragColor.a = min(text_color.a, finalColor.a) * layer_opacity;
}
}