PDA

View Full Version : Correct 2D Drawing



boiler
06-21-2011, 09:24 AM
Hi Everybody,

i'm thinking about the correct way to draw 2D with high quality but i'm getting stuck.

The problem is that i have a 2D bitmap in it's native size drawing on position (0.5, 0). Please have a look at the attached image.

The UV coordinates are correct, it looks good at position (0, 0).

If i enable linear filtering, the bitmap looks good but blurry. All other sprites are also blurry, so that the complete scene looks worse than before.

An other solution is to cut the fraction part of the position. My question is: Is there a way to draw a bitmap at it's native size, without rotation, without filtering enabled at position (0.5, 0)?

Thank you in advance.
Regards Mario

_x57_
06-22-2011, 02:42 AM
the bitmap looks good but blurry
Naturally lowpass filtering like linear filtering introduces blurriness - thats the whole point of doing it, isn't it?
Of course this effect seems more prominent if you are dealing with thin structures like your ~3 pixel wide letter.

The problem might be that in linear 2d filtering only four pixel values from your texture are used to calculate the new color so that for a BW bitmap you only have black, white, 25% gray, 50%gray and 75% gray pixels in the result. Using multisampling with more samples (8-16) may produce better results.