When originally developing my game with SDL, I had my tiles render on whole-pixels to avoid artifacts. In Bevy, however, the transform for the sprite bundle is in f32s. Is there anyway to to change this or make sure the positions for my tiles are whole-numbers on each update? Or any other solutions to avoid artifacts in a tiled level?
#Render sprites to whole pixels
4 messages · Page 1 of 1 (latest)
This might be what you are looking for, or at least help. It aligns sprites to integer pixels.
.add_plugins(DefaultPlugins .set(ImagePlugin::default_nearest())
Another option would be to create a system that runs at the end of the update loop that rounds the transform coordinates, but I would start with the image plugin settings first
Jorgy’s approach is what I used for pixel art projects, but there’s also a plug-in that does some additional stuff for pixel-art rednering: https://github.com/drakmaniso/bevy_pixel_camera