-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or requestrenderRelating to the engine's rendererRelating to the engine's renderer
Description
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:
- Change the
StaticMeshclass to allow an 'instanced' configuration. This config will add aMat4transform instanced variable to the vertex attributes. - Change the VertexBuffer class to track partitions and bind to those partitions when needed. The reason for this is that we need to effectively split our vertex buffers into two parts - the instanced parts and the per-vertex parts. The instanced parts should be smaller and self-contained while the per-vertex parts will likely be much larger. When we bind the buffer, the buffer should be able to bind both parts of the vertex buffer for us.
- Change the
StaticMeshclass to accept textures for sub-sections of the mesh where available. This should be configured per-submesh. - Change
ModelRendererto account for instanced meshes when drawing.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestrenderRelating to the engine's rendererRelating to the engine's renderer