Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a custom shader for correct pixel-art upscaling #11

Open
drakmaniso opened this issue Jul 31, 2022 · 1 comment
Open

Add a custom shader for correct pixel-art upscaling #11

drakmaniso opened this issue Jul 31, 2022 · 1 comment
Labels
enhancement New feature or request maybe Need further investigation

Comments

@drakmaniso
Copy link
Owner

The best filtering for upscaling pixel-art is neither "nearest" nor "linear", but a combination of the two (i.e. most pixels use "nearest", but screen pixels situated at the border between virtual pixels use linear).
References:

Unfortunately, in the current state of Bevy (0.8), it doesn't seem possible to customize the shader used by the sprite system (see issue bevyengine/bevy#1738).

An alternative would be to implement a custom sprite system, as done in https://github.com/ManevilleF/bevy_sprite_material, but it's probably best to wait for Bevy to provide a more elegant solution.

@drakmaniso drakmaniso added enhancement New feature or request maybe Need further investigation labels Jul 31, 2022
@cloud303-cholden
Copy link

@drakmaniso Just curious, is this why the cloud pixels in flappin look thinner when the background is scrolling? I've been trying to find a solution to this for my own game.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request maybe Need further investigation
Projects
None yet
Development

No branches or pull requests

2 participants