[Bf-blender-cvs] [d98e2b20d40] temp-pbvh-split: Fix T97895: Eevee support for Geometry Nodes Color Attributes.

Jeroen Bakker noreply at git.blender.org
Fri Jun 3 01:16:30 CEST 2022


Commit: d98e2b20d40080d6b6d892b6091e3794ad211dec
Author: Jeroen Bakker
Date:   Wed May 11 14:01:47 2022 +0200
Branches: temp-pbvh-split
https://developer.blender.org/rBd98e2b20d40080d6b6d892b6091e3794ad211dec

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.

===================================================================

M	source/blender/draw/intern/draw_cache_impl_mesh.c

===================================================================

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:



More information about the Bf-blender-cvs mailing list