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:
authorClément Foucault <foucault.clem@gmail.com>2018-06-15 23:09:10 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-06-16 16:49:16 +0300
commitd45d0943784773edd23418da0daaec228f58f32e (patch)
tree6f43267487a4fa081fe6c3f671a16e0906a443d6 /source/blender/draw/modes
parent5600296c9dd134073b31b0d2cde2dc47e5ad1d60 (diff)
Edit Mode: Fix bad display of edges when limit selection mode is Off.
Diffstat (limited to 'source/blender/draw/modes')
-rw-r--r--source/blender/draw/modes/shaders/edit_mesh_overlay_frag.glsl3
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/draw/modes/shaders/edit_mesh_overlay_frag.glsl b/source/blender/draw/modes/shaders/edit_mesh_overlay_frag.glsl
index 05b74e9217a..4627643cf86 100644
--- a/source/blender/draw/modes/shaders/edit_mesh_overlay_frag.glsl
+++ b/source/blender/draw/modes/shaders/edit_mesh_overlay_frag.glsl
@@ -86,10 +86,9 @@ float distToEdge(vec2 o, vec2 dir)
#ifdef ANTI_ALIASING
void colorDistEdge(vec4 color, float dist)
{
- /* May not work if color.a is not 1.0. */
FragColor.rgb *= FragColor.a;
FragColor = mix(color, FragColor, clamp(dist, 0.0, 1.0));
- FragColor.rgb /= FragColor.a;
+ FragColor.rgb /= max(1e-8, FragColor.a);
}
#else
#define colorDistEdge colorDist