Pixel alignment algorithm
Posted
by
user42325
on Game Development
See other posts from Game Development
or by user42325
Published on 2014-05-30T07:57:38Z
Indexed on
2014/05/30
9:39 UTC
Read the original article
Hit count: 329
I have a set of square blocks, I want to draw them in a window. I am sure the coordinates calculation is correct. But on the screen, some squares' edge overlap with other, some are not.
I remember the problem is caused by accuracy of pixels. I remember there's a specific topic related to this kind of problem in 2D image rendering. But I don't remember what exactly it is, and how to solve it.
Look at this screenshot. Each block should have a fixed width margin. But in the image, the vertical white line have different width.Though, the horizontal lines looks fine.
© Game Development or respective owner