diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-07-05 13:01:47 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-07-05 13:06:47 +0300 |
commit | e7325bedfb17cfe82f5a0495188001e7ff2df497 (patch) | |
tree | 214b943e07683667bb91ab68e6389893eb544385 /source/blender/draw | |
parent | 68ec4c26b93b68c7447746540aa5b89084fb7595 (diff) |
DRW: weight-paint wire overlay made vertex selection hard to see
Diffstat (limited to 'source/blender/draw')
-rw-r--r-- | source/blender/draw/modes/paint_vertex_mode.c | 5 | ||||
-rw-r--r-- | source/blender/draw/modes/shaders/paint_wire_vert.glsl | 7 |
2 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/draw/modes/paint_vertex_mode.c b/source/blender/draw/modes/paint_vertex_mode.c index 862fb92287c..bfd189189b4 100644 --- a/source/blender/draw/modes/paint_vertex_mode.c +++ b/source/blender/draw/modes/paint_vertex_mode.c @@ -227,8 +227,9 @@ static void PAINT_VERTEX_cache_init(void *vedata) } { - DRWPass *pass = DRW_pass_create( - "Wire Pass", DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL); + DRWPass *pass = DRW_pass_create("Wire Pass", + (DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_ALPHA | + DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL)); for (int i = 0; i < MODE_LEN; i++) { DRWShadingGroup *shgrp = DRW_shgroup_create(sh_data->by_mode[i].wire_overlay, pass); DRW_shgroup_uniform_block(shgrp, "globalsBlock", G_draw.block_ubo); diff --git a/source/blender/draw/modes/shaders/paint_wire_vert.glsl b/source/blender/draw/modes/shaders/paint_wire_vert.glsl index 371c3120811..9acdc7886f7 100644 --- a/source/blender/draw/modes/shaders/paint_wire_vert.glsl +++ b/source/blender/draw/modes/shaders/paint_wire_vert.glsl @@ -32,16 +32,17 @@ void main() #ifdef USE_SELECT finalColor = (is_select) ? colSel : colorWire; + finalColor.a = nor.w; #else # ifdef VERTEX_MODE - finalColor = colorWire; + finalColor.xyz = colorWire.xyz; + finalColor.a = 1.0; # else /* Weight paint needs a light color to contrasts with dark weights. */ - finalColor.xyz = vec3(0.8, 0.8, 0.8); + finalColor = vec4(1, 1, 1, 0.2); # endif #endif - finalColor.a = nor.w; gl_PointSize = sizeVertex * 2.0; #ifdef USE_WORLD_CLIP_PLANES |