bevyengine / bevyengine/bevy

Default for ImageAddressMode should be Repeat

Open
#23,263 5 comments 0 reactions 0 assignees View on GitHub
A-Assets A-Rendering C-Feature C-Usability D-Trivial S-Needs-Design X-Contentious
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?

Default for `ImageAddressMode` is, as of `0.18.1`, `ClampToEdge`. IMO `Repeat` would be a better default value. It would still work the same for uv layouts that don't overflow the 0.0-1.0 range, but uv layouts that rely on a repeating texture would work out of the box. Clamping the texture is a rare use case.

### Side Issue: It is too much work to set a texture to repeat.

Currently you either need to use `AssetServer::load_with_settings` and pass a closure, or you need to create a `.meta` file for the asset. If you choose the 1st method you can use `..default()` and specify only the fields you want to change, but 2nd method you need to specify every single field which is cumbersome. If `Repeat` was the default we wouldn't need to do this.

## What solution would you like?

Change the default from `ClampToEdge` to `Repeat`.

## What alternative(s) have you considered?

I managed to get the texture to repeat using both `load_with_settings` and `.meta` file approach. (mentioned above)

## Additional context

.

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.