A pixel perfect post processing effect based on Aarthificial's Astortion renderer.
- Use nearest neighbor filtering. (
ImagePlugin::default_nearest()
) - Add the
PixelPerfectPlugin
plugin to your app. - Add the
PixelPerfectCamera
component to your camera and set theresolution
field to the desired virtual resolution. - Move the camera with
subpixel_position
instead of translation.
Check examples
for full usage example.
The bilinear
feature enables bilinear sampling in the shader. This reduces aliasing in the final texture at the cost of minorly increasing the
cost of the upscale. Do not disable nearest neighbor filtering when using this feature, the bilinear sampling is done in shader due to how the upscaling works.
If you're experiencing artifacts with this feature enabled try disabling it.
bevy |
bevy_pixel_pefect |
---|---|
0.12 |
0.1 |