Adding extra color attribute to instanced mesh

I use instanceColor in the custom fragment shader to render instanced mesh, at the same time I need to blend this color with another, also defined for each instance.

So I ended up assigning an attribute to instanced mesh geometry, like so:

imesh.geometry.setAttribute('instanceRGID', 
new THREE.InstancedBufferAttribute(new Float32Array(rgID), 3));

It seem to work but my concern is that the attribute is instanced but the geometry isn’t, so I wanted to double check if it’s ok with the library?

On the other hand, I don’t see a different way to pass an instanced attribute to a vertex shader without modifying the library code.

I’m not sure of how instanced attributes work, but I’ve had good results using InstancedUniformMesh for setting per instance uniforms ( that are treated as attributes under the hood ).