UNPKG

@lume/three-instanced-mesh

Version:

Scene graph level abstraction for three.js InstancedBufferGeometry

19 lines (10 loc) 271 B
// multiply the color with per instance color if enabled export default /* glsl */ ` #ifdef USE_COLOR diffuseColor.rgb *= vColor; #endif #if defined(INSTANCE_COLOR) diffuseColor.rgb *= vInstanceColor; diffuseColor.a = vInstanceOpacity * opacity; #endif `;