diff options
Diffstat (limited to 'source/blender/draw/engines/eevee/eevee_materials.c')
-rw-r--r-- | source/blender/draw/engines/eevee/eevee_materials.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_materials.c b/source/blender/draw/engines/eevee/eevee_materials.c index 3b78d8718ef..2b8673e2f53 100644 --- a/source/blender/draw/engines/eevee/eevee_materials.c +++ b/source/blender/draw/engines/eevee/eevee_materials.c @@ -28,9 +28,8 @@ #include "BLI_rand.h" #include "BLI_string_utils.h" -#include "BKE_particle.h" #include "BKE_paint.h" -#include "BKE_pbvh.h" +#include "BKE_particle.h" #include "DNA_world_types.h" #include "DNA_modifier_types.h" @@ -1535,10 +1534,7 @@ void EEVEE_materials_cache_populate(EEVEE_Data *vedata, Scene *scene = draw_ctx->scene; GHash *material_hash = stl->g_data->material_hash; - bool is_sculpt_mode = DRW_object_use_pbvh_drawing(ob); - /* For now just force fully shaded with eevee when supported. */ - is_sculpt_mode = is_sculpt_mode && - !(ob->sculpt->pbvh && BKE_pbvh_type(ob->sculpt->pbvh) == PBVH_FACES); + bool use_sculpt_pbvh = BKE_sculptsession_use_pbvh_draw(ob, draw_ctx->v3d); /* First get materials for this mesh. */ if (ELEM(ob->type, OB_MESH, OB_CURVE, OB_SURF, OB_FONT, OB_MBALL)) { @@ -1606,7 +1602,7 @@ void EEVEE_materials_cache_populate(EEVEE_Data *vedata, int auto_layer_count; struct GPUBatch **mat_geom = NULL; - if (!is_sculpt_mode) { + if (!use_sculpt_pbvh) { mat_geom = DRW_cache_object_surface_material_get(ob, gpumat_array, materials_len, @@ -1615,7 +1611,7 @@ void EEVEE_materials_cache_populate(EEVEE_Data *vedata, &auto_layer_count); } - if (is_sculpt_mode) { + if (use_sculpt_pbvh) { /* Vcol is not supported in the modes that require PBVH drawing. */ bool use_vcol = false; DRW_shgroup_call_sculpt_with_materials(shgrp_array, ob, use_vcol); |