Sign in to follow this  
ehmdjii

font looks fuzzy when blended

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this