Is it strange? threejs showcase "webgl_instancing_performance"

performance of NAIVE is better than INSTANCING on my computer.

GPU Memory of NAIVE is equal with INSTANCING.
GPU Memory of NAIVE may should equal with MERGE.

I check the source code.

find something in function makeNaive(geometry)

const mesh = new THREE.Mesh( geometry, material );

it seems to be const mesh = new THREE.Mesh( geometry.clone(), material );

am i mis something?

1 Like

What operating system and browser are you using?

win10 home 21H2 and Chrome 103 64bit

I understand that you ask me this two questions. It may had two meanings
1 performance of NAIVE should NOT better than INSTANCING
2 showcase “webgl_instancing_performance” work well on your computer ?

I believe this is a Chromium issue since Firefox and Safari perform better when using instancing or merged meshes.

2 Likes

if i drive up the object count to 10.000 i get 120fps on chrome instanced, and 40fps naive. on a m1. so maybe the issue is limited to chrome windows.

thanks your data.
my data is
count 10000, NAIVE drawcall 10000, memory 173.74KB, 19FPS(stable)
count 10000, MERGED drawcall 1, memory 226.25MB, 16FPS(stable)
count 10000, INSTANCED drawcall 1, memory 173.75KB, 17FPS(stable)

It’s not a particularly scientific test right now, there might be better or more realistic ways to set this up. I wonder if a scene that contains a mix of different objects (rather than 10,000 of the same thing) would have more GL state changes and worse performance in the naive case. And of course the hardware implementations do vary a bit.