DRW: weight-paint wire overlay made vertex selection hard to see

This commit is contained in:
Campbell Barton 2019-07-05 20:01:47 +10:00
parent 68ec4c26b9
commit e7325bedfb
2 changed files with 7 additions and 5 deletions

View File

@ -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);

View File

@ -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