I’ve successfully tested it with manipulating ‘color’ attribute. It looks like this attribute colour is being an additive colour to the main vertex colour, that’s why it’s alpha value has no effect on resulting instance transparency.
Now I’m wondering is it possible to use custom buffers to control instance transparency?
I have a weak knowledge of shaders and don’t know at what level material alpha property is being applied. Is it being sent as an attribute to vertex shader?
The hasVertexAlpha property has resolved the original issue I have described here.
But enabling it causes another problem with instances - their layering behaviour changes.
It is expected that instance which is closest to the camera should be rendered above all other instances, but what happens after hasVertexAlpha has been set to true is that instance created last is being rendered above all other instances regardless their distance to the camera.
Well, this is a known issue.
Maybe is it possible to sort the instance array and the instance buffer each frame according to the distance from the camera