Three.js - Using multiple textures in a single PointCloud
I'm trying to use multiple textures in a single PointCloud using a ShaderMaterial. I'm passing a texture array to the shader along with texture index attributes and selecting the appropriate texture to use in the fragment shader. Relevant Setup Code: var particleCount = 100; var uniforms = { textures: { type: 'tv', value: this.getTextures() } }; var attributes = { texIndex: { type: 'f', value: [] }, color: { type: 'c', value: [] }, }; var material = new THREE.ShaderMaterial({ uniforms: uniforms, attributes: attributes, vertexShader: document.getElementById('vertexShader').textContent,