diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-07-13 12:09:40 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-07-13 12:09:40 +0300 |
commit | a3240df269609e8c7cafaeeec8dfbccd07df7cd3 (patch) | |
tree | ac5cb925a52b574d5e3dd4efc7a16f63e7b26771 /source/blender/draw | |
parent | 86b7698a3e203a1b9a26c88a0d1acc1cb8b090c6 (diff) |
Always using full shading for eevee + sculpt mode
Also disable for dyntopo & multires since its currently not supported.
Diffstat (limited to 'source/blender/draw')
-rw-r--r-- | source/blender/draw/engines/eevee/eevee_materials.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_materials.c b/source/blender/draw/engines/eevee/eevee_materials.c index 8b94ffb34c3..d6202dcba6e 100644 --- a/source/blender/draw/engines/eevee/eevee_materials.c +++ b/source/blender/draw/engines/eevee/eevee_materials.c @@ -34,6 +34,8 @@ #include "BLI_alloca.h" #include "BKE_particle.h" +#include "BKE_paint.h" +#include "BKE_pbvh.h" #include "GPU_material.h" @@ -928,7 +930,14 @@ void EEVEE_materials_cache_populate(EEVEE_Data *vedata, EEVEE_SceneLayerData *sl const bool do_cull = BKE_collection_engine_property_value_get_bool(ces_mode_ob, "show_backface_culling"); const bool is_active = (ob == draw_ctx->obact); const bool is_sculpt_mode = is_active && (ob->mode & OB_MODE_SCULPT) != 0; +#if 0 const bool is_sculpt_mode_draw = is_sculpt_mode && (draw_ctx->v3d->flag2 & V3D_SHOW_MODE_SHADE_OVERRIDE) == 0; +#else + /* For now just force fully shaded with eevee when supported. */ + const bool is_sculpt_mode_draw = + is_sculpt_mode && + ((ob->sculpt && ob->sculpt->pbvh) && (BKE_pbvh_type(ob->sculpt->pbvh) != PBVH_FACES)); +#endif const bool is_default_mode_shader = is_sculpt_mode; /* First get materials for this mesh. */ |