Vertexless Instancing

Hi community!

Picture:

DEMO: https://codepen.io/prisoner849/pen/jOKjppo

Made with r147 + importmaps. Thus, better to open in Chrome :slight_smile:
The base of the demo is this example: three.js examples
So I just had a thought “what if I do it with InstancedBufferGeometry?”.

11 Likes

Love “vertexless” this demo is insanely good, it’s incredibly smooth with 1 million triangle instances on a huawei p30 here, really cool stuff!

1 Like

This is pretty clever! I didn’t know that gl_VertexID existed.

2 Likes

@marquizzo AFAIK, it’s a WebGL2 feature (and gl_InstanceID too)

1 Like

Super :+1:
The pen also works fine for me with the latest Firefox and Opera.

1 Like

Great idea! :+1:

1 Like

This is very cool, I shared this on Twitter and a lot of people seem to like it! https://twitter.com/Omar4ur/status/1604127902353788928

there was an interesting question about interacting with it, whether you can make it react to mouse for example. And I think the answer is yes (probably just pass the the mouse position as a uniform and figure that out in the shader)

1 Like