Fix color attribute interpolation with GPU subdivision

Handling of 16-bits compression was missing, which gave values that were
way off.
This commit is contained in:
Kévin Dietrich 2022-06-27 12:39:31 +02:00
parent 85db51cd21
commit c145441981
Notes: blender-bot 2023-02-14 11:35:46 +01:00
Referenced by issue #98661, 3.2: Potential candidates for corrective releases
1 changed files with 6 additions and 2 deletions

View File

@ -390,8 +390,12 @@ static void extract_attr_init_subdiv(const DRWSubdivCache *subdiv_cache,
/* Ensure data is uploaded properly. */
GPU_vertbuf_tag_dirty(src_data);
draw_subdiv_interp_custom_data(
subdiv_cache, src_data, dst_buffer, static_cast<int>(dimensions), 0, false);
draw_subdiv_interp_custom_data(subdiv_cache,
src_data,
dst_buffer,
static_cast<int>(dimensions),
0,
request.cd_type == CD_PROP_COLOR);
GPU_vertbuf_discard(src_data);
}