Opacity attribute for instanced geometry?

I managed to set custom colors, sizes and positions for instances but not opacity, is that possible w/o writing a custom shader?

In a nutshell, opacity doesn’t work like so:

mat.transparent = true;
mat.vertexColors = true;
geo.setAttribute('opacity', new THREE.InstancedBufferAttribute(new Float32Array(str.op), 1));
geo.setAttribute('color', new THREE.InstancedBufferAttribute(new Float32Array(clr), 3));

please see the full code here:
https://jsfiddle.net/tfoller/u1g4j8ce/39/

I’m not concerned with object overlapping order, thank you!

Unfortunately, that does not work unless you modify the shader code.

BTW: You can use InstancedMesh.setColorAt() instead of adding a custom color attribute.

https://jsfiddle.net/tyh2mpq6/1/

Thank you, I think setOpacityAt could be a useful function to have.