Opacity for InstancedMesh

It has nothing to do with the shader, it’s a order related “issue” as instances unlike the regular scene graph objects are not sorted, InstancedMesh is as static as it can be without updating all the instances matrices every frame.

I release a plugin about end of the week that will cover this sorting issue with a sort option for instances, the API is on top of InstancedMesh but a bit different as you have regular Mesh objects in your scene. It’s the sister component of the SkinnedInstancer that enables optional LOD and culling features also for non-skinned meshes.

The purpose is drawcall batching, InstancedMesh is static and therefore won’t require any further per frame / per object updating or buffer updates which can be a benefit or a huge number- at a bit lower polycount as there also is no culling and everything drawn.

However there are also further ways to archive “order independent” transparency but they are much more complicated and i suppose overkill for your needs.

1 Like