Jump to content
  • Advertisement
Sign in to follow this  
ehmdjii

font looks fuzzy when blended

This topic is 4487 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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!

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites
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:

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!