playcanvas / playcanvas/engine

Batching UI elements should easier to do correctly

Open
#2,778 2 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: graphics area: ui enhancement
Dominant language
JavaScript
Stars
16.8k
Forks
2k
Avg merge
4h 32m
Merged PRs (30d)
222

Description

Related forum thread: https://forum.playcanvas.com/t/batching-of-ui-elements/15946/9

Other issues:
https://github.com/playcanvas/engine/issues/2579
https://github.com/playcanvas/engine/issues/2578

Currently, batching UI elements requires using layers to enforce the render order for the batcher and ensure that elements are rendered correctly. If we can make this easier so there's less work on the user to have to construct their UI screens, that could be a big win.

The example in the forum was pretty straight forward to do as there wasn't any real overlapping elements and UI order is clearly defined. (Board, red tiles then text). I can imagine larger projects being more complex and harder to manage globally.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Begin with the linked forum thread and related issues #2579 and #2578 to understand the current batching and UI-order constraints. The work is done when UI batching no longer requires users to construct layers to enforce correct render order, including for more complex overlapping screens.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics, game-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.