Low-res render without intermediate sprite
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 171
Description
## What problem does this solve or what need does it fill?
One popular way to achieve a pixel art look is to render your scene to a low-resolution texture, before scaling it up. The advantage to this is that we are guaranteed to get a perfect grid of pixels for free. An example implementation can be seen here: https://github.com/bevyengine/bevy/pull/8112.
The problem is that this breaks some expectations taken by granted, such as where your cursor is *actually* located. Since the physical scene is smaller than what actually shows up in your screen (the scaled up texture), your cursor is no longer synchronized with what you're seeing.
This broke `bevy_mod_picking` (though it can be worked around) and I'd no doubt face this problem again with UI (once https://github.com/bevyengine/bevy/pull/10559 drops).
## What solution would you like?
An integrated solution that takes care of these things automatically would be really nice. In Ebitengine, we can specify the logical resolution of our game's screen which is then automatically scaled up to fit the window size. Maybe we can have something similar in Bevy too.
## What alternative(s) have you considered?
The alternative is to manually deal with inconsistencies introduced by the intermediate sprite method on a per-context basis.
## Additional context
Related: https://github.com/bevyengine/bevy/discussions/5712
Contributor guide
Research direction
The issue names no files or tests. Start by reviewing the linked Bevy pull request, the Ebitengine logical-resolution approach, and the related discussion; done means an integrated low-resolution rendering mode that keeps cursor and future UI coordinates synchronized with the scaled output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- computer-graphics, game-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100