Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKévin Dietrich <kevin.dietrich@mailoo.org>2022-06-27 13:39:31 +0300
committerKévin Dietrich <kevin.dietrich@mailoo.org>2022-06-28 11:26:38 +0300
commitc145441981097f4bb2effa91fc587f22436dc723 (patch)
tree73c99fdd454458ba31ae11eead3dd7883866cdcb
parent85db51cd21ca277cb9580aef4484af3ee694f7cc (diff)
Fix color attribute interpolation with GPU subdivision
Handling of 16-bits compression was missing, which gave values that were way off.
-rw-r--r--source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_attributes.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_attributes.cc b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_attributes.cc
index 497cde9aaf2..9e0495e1080 100644
--- a/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_attributes.cc
+++ b/source/blender/draw/intern/mesh_extractors/extract_mesh_vbo_attributes.cc
@@ -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);
}