https://github.com/celerysaltgames/bevy_retro_camera
Scaled pixel-perfect rendering camera for Bevy
https://github.com/celerysaltgames/bevy_retro_camera
bevy bevy-plugin bevy-retrograde camera pixel-perfect rendering
Last synced: 4 months ago
JSON representation
Scaled pixel-perfect rendering camera for Bevy
- Host: GitHub
- URL: https://github.com/celerysaltgames/bevy_retro_camera
- Owner: celerysaltgames
- License: mit
- Created: 2022-08-24T18:43:20.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-08-26T08:33:04.000Z (almost 4 years ago)
- Last Synced: 2025-09-01T12:58:43.315Z (10 months ago)
- Topics: bevy, bevy-plugin, bevy-retrograde, camera, pixel-perfect, rendering
- Language: Rust
- Homepage: https://crates.io/crates/bevy_retro_camera
- Size: 429 KB
- Stars: 4
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Bevy Retro Camera
[](https://crates.io/crates/bevy_retro_camera)
[](https://docs.rs/bevy_retro_camera)
[](https://github.com/celerysaltgames/bevy_retro_camera)

Bevy Retro camera is a 2D, pixel-perfect camera for Bevy. It does work for **Bevy 0.8**.
## Features
- Easy to configure camera optimized for 2D pixel-art rendering.
- Plugin that improve Bevy's rendering for pixel art -> Will save you hours of "Why my pixels are blurs ?"
## Quickstart
Create a startup system and use `RetroCameraBundle` to create a camera. It's also recommended to add the `RetroCameraPlugin` to disable the blur effect due to Bevy's default rendering configuration.
```rust
// Add RetroCameraPlugin to you app + a startup system
fn main() {
App::new()
.add_plugin(RetroCameraPlugin)
.add_startup_system(setup)
}
// Configure your startup system
fn setup(mut commands: Commands) {
let height: f32 = 240.0; // Viewport size
let scale: f32 = 1.0; // Viewport scaling factor
commands.spawn_bundle(RetroCameraBundle::fixed_height(height, scale));
}
```
## Compatibility matrix
| Bevy | bevy_retro_camera |
|------|-------------------|
| 0.8 | 1.0 |
## Inspired by
- The excellent [Bevy Cheatbook](https://bevy-cheatbook.github.io/cookbook/custom-projection.html) about custom projections.
- Bevy's [Camera and Viewport update](https://github.com/bevyengine/bevy/commit/ae0ccfb4f6d41d2033be03b48e2538d1cf0cd86f).
- The _RetroCameraBundle_ of [Bevy Retrograde](https://crates.io/crates/bevy_retrograde)