diff options
Diffstat (limited to 'source/blender/draw/modes/paint_weight_mode.c')
-rw-r--r-- | source/blender/draw/modes/paint_weight_mode.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/source/blender/draw/modes/paint_weight_mode.c b/source/blender/draw/modes/paint_weight_mode.c index 3cc2ad63ed4..a5a9f355dc6 100644 --- a/source/blender/draw/modes/paint_weight_mode.c +++ b/source/blender/draw/modes/paint_weight_mode.c @@ -118,8 +118,6 @@ static void PAINT_WEIGHT_engine_init(void *UNUSED(vedata)) } } -static float world_light; - static void PAINT_WEIGHT_cache_init(void *vedata) { PAINT_WEIGHT_PassList *psl = ((PAINT_WEIGHT_Data *)vedata)->psl; @@ -134,12 +132,13 @@ static void PAINT_WEIGHT_cache_init(void *vedata) /* Create a pass */ psl->weight_faces = DRW_pass_create( "Weight Pass", - DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS); + DRW_STATE_WRITE_COLOR | DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS | DRW_STATE_MULTIPLY); stl->g_data->fweights_shgrp = DRW_shgroup_create(e_data.weight_face_shader, psl->weight_faces); static float light[3] = {-0.3f, 0.5f, 1.0f}; static float alpha = 1.0f; + static float world_light = 1.0f; DRW_shgroup_uniform_vec3(stl->g_data->fweights_shgrp, "light", light, 1); DRW_shgroup_uniform_float(stl->g_data->fweights_shgrp, "alpha", &alpha, 1); DRW_shgroup_uniform_float(stl->g_data->fweights_shgrp, "global", &world_light, 1); @@ -187,8 +186,6 @@ static void PAINT_WEIGHT_cache_populate(void *vedata, Object *ob) const bool use_vert_sel = (me->editflag & ME_EDIT_PAINT_VERT_SEL) != 0; struct Gwn_Batch *geom; - world_light = BKE_collection_engine_property_value_get_bool(ces_mode_pw, "use_shading") ? 0.5f : 1.0f; - if (use_surface) { geom = DRW_cache_mesh_surface_weights_get(ob); DRW_shgroup_call_add(stl->g_data->fweights_shgrp, geom, ob->obmat); @@ -233,7 +230,6 @@ void PAINT_WEIGHT_collection_settings_create(IDProperty *properties) properties->type == IDP_GROUP && properties->subtype == IDP_GROUP_SUB_MODE_PAINT_WEIGHT); - BKE_collection_engine_property_add_bool(properties, "use_shading", true); BKE_collection_engine_property_add_bool(properties, "use_wire", false); } |