bevyengine / bevyengine/bevy

`ArrayTextureBuilder` or `TextureAtlasBuilder` layout control

Open
#3,226 0 comments 4 reactions 0 assignees View on GitHub
A-Assets A-Rendering C-Feature C-Usability
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

## What problem does this solve or what need does it fill?

The [`array texture`](https://github.com/bevyengine/bevy/blob/3de391be21666c90661066ca395c63813352b4bb/examples/shader/array_texture.rs) example describes how to use texture array with shader.
The [`texture atlas`](https://github.com/bevyengine/bevy/blob/3de391be21666c90661066ca395c63813352b4bb/examples/2d/texture_atlas.rs) example describes how to merge multiple texture files into a single texture.

But array texture requires that elements in the texture to be layouted vertically, but there is no control on texture atlas layout.

## What solution would you like?

Either create a `ArrayTextureBuilder` to handle the sprite merging and also ensure all sprites have the same size, or add a way to control how sprite in `TextureAtlasBuilder` are layouted.

## What alternative(s) have you considered?

None

related: https://github.com/bevyengine/bevy/discussions/3222

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.