Skip to content

Instanced rendering of imported with vsgXchange models #1154

Answered by robertosfield
Anshi701 asked this question in Q&A
Discussion options

You must be logged in to vote

The [standard.vert](https://github.com/vsg-dev/vsgExamples/blob/master/data/shaders/standard.vert ,that is used in the flat shaded, phong and pbr (that vsgXchange::assimp typically uses) ShaderSet's, have support for instancing, but as I explained that doesn't work for whole subgraphs.

The VSG_BILLBOARD and VSG_INSTANCE_POSITION code paths in the standard.vert are what map per instance position data to positioning of meshes. So you need to pass in the position array to the vertex array setup.

This setup is much easier why you create your own geometry subgraphs, reaching into arbitrarily complex subgraphs will be less easy - if you want to keep pursuing what you are doing this is what you'…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@Anshi701
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by Anshi701
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