I found that BatchedMesh convert InstancedBufferGeometry to BufferGeometry. Maybe in future will be added option to save InstancedBufferGeometry it will be hellpfull for grass instancing and performance instead InstancedMesh. I was try replace BatchedMesh.geometry with InstancedBufferGeometry and it work but show only 1 of 5000 objects with customShader.
Why would you want to use BatchedMesh
if you only have one geometry?
If it is for frustum culling, you can see this:
Because i want 1 draw call and several frustumCulls and fast calculation.
For example i have 25 meshes around player. Each mesh with InstancedBufferGeometry which display 100.000 grases and total 2.500.000 grases. To decrese draw calls from 25 to 1 i need for batchedMesh which can merge geometryes to one and show to only visible meshes with instances and decrease rendered triangles. I made script which merging meshes to one and use 1 draw call but if i will use frusum eveery frame then it take about 7ms instead 0-1ms with batchedMesh but configured to display InstancedBufferGeometry with customShader with offsets for instances.
BatchedMesh at this time is good solution for landscape, water chunck separeted to small meshes.
I am working on a similar example, using a BVH for frustum culling and LOD of instances, without having to split into chunks and having a number of draw calls equal to the LODs. The performance is good.
I tried to render all with a single draw call using multiDrawInstanced but I read that there is no compatibility with firefox (and it’s not possible to sort) so I gave up after writing a small example.
@Mugen87 BatchedMesh.InstancedBufferGeometry instead BatchedMesh.BufferGeometry immposible?