diff options
author | Joseph Eagar <joeedh@gmail.com> | 2022-06-08 22:30:01 +0300 |
---|---|---|
committer | Joseph Eagar <joeedh@gmail.com> | 2022-06-08 22:30:01 +0300 |
commit | 285a68b7bbf2fa40e41d507991467387f5dd5264 (patch) | |
tree | 0d1f4ea92f6d7e9eb512d85e541905bc198800f6 /source/blender/draw/engines/workbench | |
parent | 9c28f0eb37aebd6e5eae0763b008ef02d5ce081b (diff) |
Sculpt: PBVH Draw Support for EEVEE
This patch adds support for PBVH drawing in EEVEE.
Notes:
# PBVH_FACES only. For Multires we'll need an API to get/cache attributes. DynTopo support will be merged in later with sculpt-dev's DynTopo implementation.
# Supports vertex color and UV attributes only; other types can be added fairly easily though.
# Workbench only sends the active vertex color and UV layers to the GPU.
# Added a new draw engine API method, DRW_cdlayer_attr_aliases_add. Please review.
# The vertex format object is now stored in the pbvh.
Reviewed By: Clément Foucault & Brecht Van Lommel & Jeroen Bakker
Differential Revision: https://developer.blender.org/D13897
Ref D13897
Diffstat (limited to 'source/blender/draw/engines/workbench')
-rw-r--r-- | source/blender/draw/engines/workbench/workbench_engine.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/draw/engines/workbench/workbench_engine.c b/source/blender/draw/engines/workbench/workbench_engine.c index fb20bde2f65..9eb35c25bf4 100644 --- a/source/blender/draw/engines/workbench/workbench_engine.c +++ b/source/blender/draw/engines/workbench/workbench_engine.c @@ -97,7 +97,7 @@ static void workbench_cache_sculpt_populate(WORKBENCH_PrivateData *wpd, { const bool use_single_drawcall = !ELEM(color_type, V3D_SHADING_MATERIAL_COLOR); if (use_single_drawcall) { - DRWShadingGroup *grp = workbench_material_setup(wpd, ob, 0, color_type, NULL); + DRWShadingGroup *grp = workbench_material_setup(wpd, ob, ob->actcol, color_type, NULL); DRW_shgroup_call_sculpt(grp, ob, false, false); } else { @@ -323,7 +323,8 @@ static eV3DShadingColorType workbench_color_type_get(WORKBENCH_PrivateData *wpd, } } - if (is_sculpt_pbvh && color_type == V3D_SHADING_TEXTURE_COLOR) { + if (is_sculpt_pbvh && color_type == V3D_SHADING_TEXTURE_COLOR && + BKE_pbvh_type(ob->sculpt->pbvh) != PBVH_FACES) { /* Force use of material color for sculpt. */ color_type = V3D_SHADING_MATERIAL_COLOR; } |