diff options
author | Jeroen Bakker <jbakker> | 2020-05-14 12:56:16 +0300 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2020-05-14 12:58:33 +0300 |
commit | 7d38f5036794e7bf2678c8138b940257b152435b (patch) | |
tree | a664d8092fd10eeebe4f99538c75d4e1e1a4a528 /source/blender/draw/engines/eevee | |
parent | 975c45df9a1c21140710ef16ce5ce4b5565ab90f (diff) |
Fix T75908: Sculpt GPU Batches + Render Artifacts
When sculpting the GPU batches are constructed with only the required data
for a single viewport. When that viewport changes shading or coloring mode (object
to vertex) batches might not hold all the needed information.
There is also a case when you have two 3d viewport one in object color
mode and the other in vertex color mode that the GPU batches were
updated without any vertex colors.
In order to fix these category of issues this patch would always
construct the full GPU batches for sculpting.
Reviewed By: Clément Foucault, Pablo Dobarro
Maniphest Tasks: T75908
Differential Revision: https://developer.blender.org/D7701
Diffstat (limited to 'source/blender/draw/engines/eevee')
-rw-r--r-- | source/blender/draw/engines/eevee/eevee_materials.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_materials.c b/source/blender/draw/engines/eevee/eevee_materials.c index f0dbd47e146..03cdb02a48a 100644 --- a/source/blender/draw/engines/eevee/eevee_materials.c +++ b/source/blender/draw/engines/eevee/eevee_materials.c @@ -2073,23 +2073,21 @@ void EEVEE_materials_cache_populate(EEVEE_Data *vedata, } if (use_sculpt_pbvh) { - /* Vcol is not supported in the modes that require PBVH drawing. */ - const bool use_vcol = false; struct DRWShadingGroup **sculpt_shgrps_array = BLI_array_alloca(sculpt_shgrps_array, materials_len); for (int i = 0; i < materials_len; i++) { sculpt_shgrps_array[i] = shgrps_array[i].shading_grp; } - DRW_shgroup_call_sculpt_with_materials(sculpt_shgrps_array, materials_len, ob, use_vcol); + DRW_shgroup_call_sculpt_with_materials(sculpt_shgrps_array, materials_len, ob); for (int i = 0; i < materials_len; i++) { sculpt_shgrps_array[i] = shgrps_array[i].depth_grp; } - DRW_shgroup_call_sculpt_with_materials(sculpt_shgrps_array, materials_len, ob, use_vcol); + DRW_shgroup_call_sculpt_with_materials(sculpt_shgrps_array, materials_len, ob); for (int i = 0; i < materials_len; i++) { sculpt_shgrps_array[i] = shgrps_array[i].depth_clip_grp; } - DRW_shgroup_call_sculpt_with_materials(sculpt_shgrps_array, materials_len, ob, use_vcol); + DRW_shgroup_call_sculpt_with_materials(sculpt_shgrps_array, materials_len, ob); for (int renderpass_index = 0; renderpass_index < stl->g_data->render_passes_material_count; @@ -2097,7 +2095,7 @@ void EEVEE_materials_cache_populate(EEVEE_Data *vedata, for (int i = 0; i < materials_len; i++) { sculpt_shgrps_array[i] = shgrps_array[i].material_accum_grp[renderpass_index]; } - DRW_shgroup_call_sculpt_with_materials(sculpt_shgrps_array, materials_len, ob, use_vcol); + DRW_shgroup_call_sculpt_with_materials(sculpt_shgrps_array, materials_len, ob); } /* TODO(fclem): Support shadows in sculpt mode. */ |