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/modes/shaders/paint_weight_frag.glsl')
-rw-r--r--source/blender/draw/modes/shaders/paint_weight_frag.glsl5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/draw/modes/shaders/paint_weight_frag.glsl b/source/blender/draw/modes/shaders/paint_weight_frag.glsl
index 8b0e03ac31c..76b7719be64 100644
--- a/source/blender/draw/modes/shaders/paint_weight_frag.glsl
+++ b/source/blender/draw/modes/shaders/paint_weight_frag.glsl
@@ -95,6 +95,11 @@ void main()
color = mix(weight_color, colorVertexUnreferenced, alert * alert);
}
+#ifdef DRW_STATE_BLEND_ALPHA
+ /* alpha blending mix */
+ fragColor = vec4(color.rgb, opacity);
+#else
/* mix with 1.0 -> is like opacity when using multiply blend mode */
fragColor = vec4(mix(vec3(1.0), color.rgb, opacity), 1.0);
+#endif
}