use bevy::prelude::*; use bevy_pixel_perfect::*; fn main() { App::new() .add_plugins(DefaultPlugins.set(ImagePlugin::default_nearest())) // Add plugin to add the post processing effect .add_plugins(PixelPerfectPlugin) .add_systems(Startup, setup) .add_systems(Update, (translate_sprite, translate_camera)) .run(); } #[derive(Component)] struct Rotate; fn setup(mut commands: Commands, asset_server: Res) { commands.spawn(PixelPerfectCameraBundle { pixel_camera: PixelPerfectCamera { resolution: Vec2::splat(64.), subpixel_position: Vec2::ZERO, bar_color: Color::BLACK, }, ..Default::default() }); commands.spawn(( SpriteBundle { texture: asset_server.load("bevy_pixel.png"), transform: Transform::from_scale(Vec2::splat(0.5).extend(1.0)), ..Default::default() }, Rotate, )); } fn translate_sprite(mut query: Query<&mut Transform, With>, time: Res