Skip to content

Hardware instancing again, but for gltfio #6847

Closed Answered by bejado
gibssa asked this question in Q&A
Discussion options

You must be logged in to vote

I don't think gltfio will support hardware instancing without some work, but if you're building Filament from source you can hack this. Essentially what you want to do though is call .instances on RenderableManager::Builder each time gltfio creates a Renderable. We merged a new API a few weeks ago:

Builder& instances(size_t instanceCount, InstanceBuffer* instanceBuffer) noexcept;

This allows you to supply an InstanceBuffer with transforms to automatically offset the position of each instance, so you don't need to change the vertex shader.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@gibssa
Comment options

@gibssa
Comment options

@bejado
Comment options

@gibssa
Comment options

@gibssa
Comment options

Answer selected by gibssa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants