mirror of
https://github.com/bevyengine/bevy
synced 2024-09-20 06:22:01 +00:00
Explain why default_nearest is used in pixel_perfect example (#8370)
# Objective Fixes #8367 ## Solution Added a comment explaining why linear filtering is required in this example, with formatting focused specifically on `ImagePlugin` to avoid confusion
This commit is contained in:
parent
2ec38d1467
commit
ff9a178818
1 changed files with 6 additions and 1 deletions
|
@ -4,7 +4,12 @@ use bevy::prelude::*;
|
|||
|
||||
fn main() {
|
||||
App::new()
|
||||
.add_plugins(DefaultPlugins.set(ImagePlugin::default_nearest()))
|
||||
.add_plugins(DefaultPlugins.set(
|
||||
// This sets image filtering to nearest
|
||||
// This is done to prevent textures with low resolution (e.g. pixel art) from being blurred
|
||||
// by linear filtering.
|
||||
ImagePlugin::default_nearest(),
|
||||
))
|
||||
.add_systems(Startup, setup)
|
||||
.add_systems(Update, sprite_movement)
|
||||
.run();
|
||||
|
|
Loading…
Reference in a new issue