Description
When repeating the use of certain 3D objects, we can improve performance and usability by allowing these objects to be instanced. This would allow multiple to be handled in a single draw call.
To enable this, we'd need to change our ModelRenderer and 3D model reading functions to the following:
Description
When repeating the use of certain 3D objects, we can improve performance and usability by allowing these objects to be instanced. This would allow multiple to be handled in a single draw call.
To enable this, we'd need to change our
ModelRendererand 3D model reading functions to the following:StaticMeshclass to allow an 'instanced' configuration. This config will add aMat4transform instanced variable to the vertex attributes.StaticMeshclass to accept textures for sub-sections of the mesh where available. This should be configured per-submesh.ModelRendererto account for instanced meshes when drawing.