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-14 22:45:02 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-06-14 22:45:16 +0300
commit7afa59e37a539174385d8a2484e2b17ae43e0a85 (patch)
tree6e38a2bed7c0ec34c34a0129e013b1804cfa5611 /source/blender/draw/modes
parentdc25e69c2d5586d2635688ab18d2606be8c1ff57 (diff)
Edit Mesh: Fix blending function of edges
This fix the ugly (usually) dark outline that was around selected edges.
Diffstat (limited to 'source/blender/draw/modes')
-rw-r--r--source/blender/draw/modes/shaders/edit_mesh_overlay_frag.glsl3
1 files changed, 3 insertions, 0 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 b7935d43bff..eadb774c57e 100644
--- a/source/blender/draw/modes/shaders/edit_mesh_overlay_frag.glsl
+++ b/source/blender/draw/modes/shaders/edit_mesh_overlay_frag.glsl
@@ -94,7 +94,10 @@ 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;
}
#else
#define colorDistEdge colorDist