UNPKG

@lume/three-instanced-mesh

Version:

Scene graph level abstraction for three.js InstancedBufferGeometry

19 lines (10 loc) 291 B
// read per instance color from attribute, pass to varying export default /* glsl */ ` #ifdef USE_COLOR vColor.xyz = color.xyz; #endif #if defined( INSTANCE_COLOR ) && defined( INSTANCE_TRANSFORM ) vInstanceColor = instanceColor; vInstanceOpacity = instanceOpacity; #endif `;