font looks fuzzy when blended

Started by
3 comments, last by ehmdjii 17 years, 10 months ago
hello, i have an alpha-mapped texture which contains characters to display text. when i blend the font it looks a bit fuzzy, although i am pretty sure that each pixel gets its correct alpha value. this happens when there is light font on dark background and dark font on light background. here is a screenshot: here is one with dark on light. it looks a bit better, but still appears jaggy. the alpha-mapped texture however displays the characters pretty sharp. the blending function i use is: glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); does anyone know, why it looks so fuzzy? thanks!
Advertisement
The characters on-screen are not the same size as they are in your texture, which causes them to be resized.

You could try using different texture filters or mipmapping techniques to get your textures a little less blurry. Here is an article explaining the various texture filters, along with some screenshots depicting the same kind of effects you are seeing in your app.

You could also try resizing your texture - if it is too big, it will look bad because it has to be scaled down so much, and if it it is too small, it will look bad because it has to be scaled up so much. Try and get your texture as 1-to-1 as possible, in relation to size, as it is on-screen, given the general size of your text.

Hope that helps.
Quote:Original post by extralongpants
The characters on-screen are not the same size as they are in your texture, which causes them to be resized.


thanks for your answer, but that is not the problem. i am definitely a 100% sure that the character size on the screen is the exact same size as in the texture. there is no resizing going on. i have even taken a screenshot and compared each pixelposition in photoshop. they are really exactly the same size.

Hmmm...
Looking at your red-on-green picture a little more closely, I think it may just have to do with the fact that your font characters have blended edges. Deep red blended with dark green might be giving you that ugly looking color surrounding your text. Try altering your texture, temporarily, so that there are no in-between alpha values - only 0 and 255 - so that the edges of the characters are 'hard'. See if that gets rid of the weird looking outlines on the red-green example.

[EDIT] - Do you have a picture with white text on a black background? I can't be sure at this point if it is just because of the colors your chose (red on dark green is always going to look weird).
thanks for your answer.
ok, i will try giving the texture-alpha a threshold, so that there are hard edges.

meanwhile, here is one with white on black:

This topic is closed to new replies.

Advertisement