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/edit_mesh_overlay_mix_frag.glsl')
-rw-r--r--source/blender/draw/modes/shaders/edit_mesh_overlay_mix_frag.glsl8
1 files changed, 3 insertions, 5 deletions
diff --git a/source/blender/draw/modes/shaders/edit_mesh_overlay_mix_frag.glsl b/source/blender/draw/modes/shaders/edit_mesh_overlay_mix_frag.glsl
index f567a3a5cbd..8f94a105332 100644
--- a/source/blender/draw/modes/shaders/edit_mesh_overlay_mix_frag.glsl
+++ b/source/blender/draw/modes/shaders/edit_mesh_overlay_mix_frag.glsl
@@ -15,10 +15,8 @@ void main()
FragColor = wire_color;
- /* this works because not rendered depth is 1.0 and the
- * following test is always true even when no wires */
- if ((wire_depth > scene_depth) && (wire_color.a > 0)) {
- /* Note : Using wire_color.a * alpha produce unwanted result */
- FragColor.a = alpha;
+ /* Modulate alpha if occluded */
+ if (wire_depth > scene_depth) {
+ FragColor.a *= alpha;
}
}