I used the InstancedMesh.
I tried to solve the problem of wrong rendering order by setting depthWrite to true. But it caused a new problem, the transparent part will appear black.
- depthWrite = true;
alphaTest = 0.02;
wrong result:
expected result:
- depthWrite = false;
The black disappears, but the rendering order is wrong. Meshes close to the camera are obscured by objects far away from the camera.