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:
authorJeroen Bakker <jeroen@blender.org>2022-05-11 15:01:47 +0300
committerJeroen Bakker <jeroen@blender.org>2022-05-11 15:01:47 +0300
commitb9d02b9cede338117179897fdcc2d3b1f7499cb3 (patch)
treed198696c3aaa1b4e0faa6f005540e9334a2f6c42 /source/blender/draw
parent5045968f24b5d7891a77021722017e93ca02f8cb (diff)
Fix T97895: Eevee support for Geometry Nodes Color Attributes.
Geometry nodes can generate color attributes that aren't on point or corner domain. When not found in these domains it will be processed as a common attribute.
Diffstat (limited to 'source/blender/draw')
-rw-r--r--source/blender/draw/intern/draw_cache_impl_mesh.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/draw/intern/draw_cache_impl_mesh.c b/source/blender/draw/intern/draw_cache_impl_mesh.c
index 07d740d89c1..7dc0244275d 100644
--- a/source/blender/draw/intern/draw_cache_impl_mesh.c
+++ b/source/blender/draw/intern/draw_cache_impl_mesh.c
@@ -708,12 +708,18 @@ static DRW_MeshCDMask mesh_cd_calc_used_gpu_layers(const Object *object,
case CD_MCOL:
case CD_PROP_BYTE_COLOR:
case CD_PROP_COLOR: {
+ /* First check Color attributes, when not found check mesh attributes. Geometry nodes
+ * can generate those layers. */
int vcol_bit = mesh_cd_calc_gpu_layers_vcol_used(&me_query, cd_vdata, cd_ldata, name);
if (vcol_bit != -1) {
cd_used.vcol |= 1UL << (uint)vcol_bit;
+ break;
}
+ if (layer != -1 && domain != ATTR_DOMAIN_NUM) {
+ drw_mesh_attributes_add_request(attributes, type, layer, domain);
+ }
break;
}
case CD_PROP_FLOAT3: