MCPcopy Index your code
hub / github.com/doonv/bevy_smooth_pixel_camera

github.com/doonv/bevy_smooth_pixel_camera @v0.4.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.4.1 ↗ · + Follow
67 symbols 80 edges 12 files 9 documented · 13% updated 2mo agov0.4.1 · 2026-04-19★ 443 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

bevy_smooth_pixel_camera

crates.io docs.rs GitHub branch check runs Following released Bevy versions

A bevy plugin that adds a simple smooth pixel camera.

It works by rendering the main camera to a small viewport which is then rendered by a second camera spawned by the plugin. This allows for hybrid rendering of both a pixelated world and high resolution assets on top.

This plugin has a smoothing feature, which makes the camera's movement appear smooth while keeping the world itself locked to a pixel grid. It works by moving the canvas in the opposite direction of the world camera's subpixel position. See the [how_smoothing_works] example for a demonstration of how it works behind the scenes.

Smoothing OFF Smoothing ON
The camera is locked to the pixel grid, causing jagged motion The camera moves smoothly while the world itself stays locked to a pixel grid.

Usage

  1. Add the bevy_smooth_pixel_camera crate to your project.

    sh cargo add bevy_smooth_pixel_camera

  2. Add the [PixelCameraPlugin] and set [ImagePlugin] to [default_nearest].

    ```rust use bevy::prelude::; use bevy_smooth_pixel_camera::prelude::;

    App::new() .add_plugins(( DefaultPlugins.set(ImagePlugin::default_nearest()), PixelCameraPlugin, )) .run(); ```

  3. Add a PixelCamera to your world.

    ```rust use bevy::prelude::; use bevy_smooth_pixel_camera::prelude::;

    fn setup(mut commands: Commands) { commands.spawn(PixelCamera::from_size(ViewportScalingMode::PixelSize(4.0))); } ```

  4. That's it!

Features

picking (default) - Enables picking through the viewport.

Bevy Compatibility

bevy bevy_smooth_pixel_camera
0.18.* 0.4.x - [main]
0.13.* 0.3.0
0.12.* 0.1.0 - 0.2.1

Core symbols most depended-on inside this repo

Shape

Function 39
Class 14
Method 11
Enum 3

Languages

Rust100%

Modules by API surface

src/components.rs16 symbols
examples/all.rs10 symbols
src/viewport.rs6 symbols
src/systems.rs6 symbols
examples/high_res_toggle.rs6 symbols
examples/how_smoothing_works.rs5 symbols
examples/mix_high_res.rs4 symbols
examples/basic_no_smoothing.rs4 symbols
examples/basic.rs4 symbols
src/lib.rs3 symbols
examples/picking.rs3 symbols

For agents

$ claude mcp add bevy_smooth_pixel_camera \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page