I'm working on a game that uses pixel art and like to keep all my pixels the same size. To achieve that, I have the
zoom property set to
(0.5, 0.5) on my
Camera2D (I tried using the
viewport stretch mode but that caused a few duplicated horizontal lines which looked really weird).
I'm trying to find a way to draw things in a pixelated way, keeping the visuals pixel-perfect (i.e. no "half-pixels"). Here's what a default
Line2D looks like:
As you can see, it doesn't really respect my camera's zoom, and its pixels are way smaller than my sprites' (the sprites are drawn to scale, so each pixel is an actual pixel and they're not scaled; only the final viewport is scaled through the camera's zoom).
Is there a way to draw that in a pixelated way? What about lights and other objects that are drawn (such as collision shapes, for example, though there's probably no use in drawing those in a pixel-perfect manner)?