bevyengine / bevyengine/bevy

Implementing PixelArt scaling mode in ImageSampler

Open
#9,349 1 comment 1 reaction 0 assignees View on GitHub
A-Rendering C-Feature
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?

Right now we have two options for scaling with pixel art: Nearest and Linear. Nearest is great for integer scaling, Linear has the trademark blurriness that accompanies Bilinear filtering.

## What solution would you like?

Cole Cecil has come up with an innovative way to take advantage of bilinear filtering using a custom vertex and fragment shader to implement arbitrary scaling factors with a minimal amount of blurriness:

https://colececil.io/blog/2017/scaling-pixel-art-without-destroying-it/

I think it would be great to implement on the 2D camera as a scaling method.

## What alternative(s) have you considered?

I'm currently using nearest using only integer scaling factors. This would enable arbitrary scaling factors.

## Additional context

I'd really like to help implement this because it'd be a great learning exercise. I'm just not sure where I'd start to implement a custom set of shaders into the pipeline.

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.