Skip to content

Optimise Minecart rendering - #350

Open
Agakitsune wants to merge 1 commit into
Engine-Room:26.1.2/devfrom
Agakitsune:26.1.2/minecartVisualOptimisation
Open

Agakitsune wants to merge 1 commit into
Engine-Room:26.1.2/devfrom
Agakitsune:26.1.2/minecartVisualOptimisation

Conversation

@Agakitsune

Copy link
Copy Markdown

Optimise all Minecart entities (normal, furnace, tnt, hopper, command block, spawner)

Since all Minecart entities share the same model, it is possible to have different entities to share the same instance of the minecart model.

Also since the sides of the minecart are the same mesh with different transforms, it's possible to, instead of drawing the 4 sides independently, draw the 4 side with 1 draw call, hence with both optimisations, it's possible to draw every Minecart types in 2 draw calls instead of 30 (5 per entity type by default)

For example:
scene

We have 4 entity types, so 20 draw calls

image

By using the same model for all Minecart types, it's possible to cut the number to 5 draw call

image

And using instacing to draw the 4 sides, we can draw everything in 2 draw call

image

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant