aui-framework / aui-framework/aui

GPU batching

Open
#476 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
598
Forks
44
Avg merge
17h 56m
Merged PRs (30d)
3

Description

### Describe the need of your project

Considering a generic game inventory:

Image

At this moment, AUI will paint every single cell one by one constantly switching between shaders and buffers while rendering different parts of each cell (background -> inset shadow -> border -> item icon -> text of some kind).

### Proposed solution

I suggest to introduce a batching algorithm to make the GPU happy. We use single shader to draw all cell's backgrounds, when all inset shadows, when all borders, when all item icons (via texture atlas), etc.

I assume this has to be done somewhere at renderer level, so if one uses renderer directly within a single view, they can gather performance benefits, still. The batching shouldn't even know about AView concept.

The implementation shouldn't know about OpenGL either, so we can reuse the same techniques as soon as we implement Vulkan/DirectX/Metal renderers.

Influenced by https://github.com/aui-framework/aui/issues/435#issuecomment-2661892154

### Alternatives you've considered

Whilst #379 looks promising for this scenario, an initial draw of this frame produces a high spike due to large amounts of draw calls.

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

The issue names no files or tests; begin at the renderer level and trace how cell backgrounds, inset shadows, borders, icons, and text are submitted. Completion means backend-agnostic batching that groups compatible draw work and reduces initial-frame draw calls while remaining usable through direct renderer access.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics, performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.