Pixel-art styled line generation.

Hey there,

I’m working on a 2D game using pixel art style. I chose to use 2D Toolkit.
The pixel art style requires to display fake big pixel on a pixel grid then everything will look aligned. To simulate old games, you can’t display an object not aligned with the pixel grid.

Everything was cool until I needed to display lines onscreen. I tried to use a line renderer then I tried to generate my own line mesh but the renderer can’t stop smoothing things up if the resolution allows it.
Here is what I have so far.
![alt text][1]

As you can see the blue line is not “jagged” enough. It clearly doesn’t fit the pixel grid.

Do you know how I can achieve such “effect”? I just want to display things in a way they are not smoothed or distorded due to the high resolution. I just need to make pixel art :slight_smile:

Thanks for your time.

You could write your own line renderer using Bresenham’s line algorithm, it’s quite fast.
With that, you can draw a pixel texture using GUI.DrawTexture or maybe put some “pixel sprites” in 2D Toolkit render queue (I don’t use 2D Toolkit so I don’t know if it’s possible) ?