DRW: weight-paint wire overlay made vertex selection hard to see
This commit is contained in:
@@ -227,8 +227,9 @@ static void PAINT_VERTEX_cache_init(void *vedata)
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
DRWPass *pass = DRW_pass_create(
|
DRWPass *pass = DRW_pass_create("Wire Pass",
|
||||||
"Wire Pass", DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL);
|
(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++) {
|
for (int i = 0; i < MODE_LEN; i++) {
|
||||||
DRWShadingGroup *shgrp = DRW_shgroup_create(sh_data->by_mode[i].wire_overlay, pass);
|
DRWShadingGroup *shgrp = DRW_shgroup_create(sh_data->by_mode[i].wire_overlay, pass);
|
||||||
DRW_shgroup_uniform_block(shgrp, "globalsBlock", G_draw.block_ubo);
|
DRW_shgroup_uniform_block(shgrp, "globalsBlock", G_draw.block_ubo);
|
||||||
|
|||||||
@@ -32,16 +32,17 @@ void main()
|
|||||||
|
|
||||||
#ifdef USE_SELECT
|
#ifdef USE_SELECT
|
||||||
finalColor = (is_select) ? colSel : colorWire;
|
finalColor = (is_select) ? colSel : colorWire;
|
||||||
|
finalColor.a = nor.w;
|
||||||
#else
|
#else
|
||||||
# ifdef VERTEX_MODE
|
# ifdef VERTEX_MODE
|
||||||
finalColor = colorWire;
|
finalColor.xyz = colorWire.xyz;
|
||||||
|
finalColor.a = 1.0;
|
||||||
# else
|
# else
|
||||||
/* Weight paint needs a light color to contrasts with dark weights. */
|
/* 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
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
finalColor.a = nor.w;
|
|
||||||
gl_PointSize = sizeVertex * 2.0;
|
gl_PointSize = sizeVertex * 2.0;
|
||||||
|
|
||||||
#ifdef USE_WORLD_CLIP_PLANES
|
#ifdef USE_WORLD_CLIP_PLANES
|
||||||
|
|||||||
Reference in New Issue
Block a user