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
@ -4,7 +4,12 @@ use bevy::prelude::*;
|
|||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
App::new()
|
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(Startup, setup)
|
||||||
.add_systems(Update, sprite_movement)
|
.add_systems(Update, sprite_movement)
|
||||||
.run();
|
.run();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user