Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Batch Rendering #1536

Open
heinezen opened this issue Sep 16, 2023 · 0 comments
Open

Batch Rendering #1536

heinezen opened this issue Sep 16, 2023 · 0 comments
Labels
area: renderer Concerns our graphics renderer improvement Enhancement of an existing component lang: c++ Done in C++ code

Comments

@heinezen
Copy link
Member

Batch rendering describes the process of drawing multiple render objects in a single draw call. An efficient implementation could save us a lot of draw calls and thus rendering time. For every batch, we want to keep the amount of texture bindings at uniform updates minimum. Therefore, the render objects in a batch should be similar, e.g. by sharing uniform values.

The big question for batch rendering is how we group render objects into batches. The renderer currently has no way of (automatically) knowing how render objects are related and which of them could be organized into a batch. There should be a mechanism to either assign render objects to a batch manually or automatically create batches on-the-fly. A BatchManager could keep track of created batches.

As a start, we could try to group render objects in the level 2 renderer that share a common set of animations (e.g. animations used for the same unit). The group is consolidated into a single batch renderable that is then passed to the level 1 renderer and drawn as a single object.

@heinezen heinezen added improvement Enhancement of an existing component area: renderer Concerns our graphics renderer lang: c++ Done in C++ code labels Sep 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: renderer Concerns our graphics renderer improvement Enhancement of an existing component lang: c++ Done in C++ code
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant