5

i have a really weird problem, i'm trying to print a simple spritefont on screen but the sprite is getting really blurry...

I have loaded the spritefont from VS 2010 using content pipeline to form the xnb file then load it to VS2012 under monogame

public void DrawText(int x, int y, string s)
    {
        _color = Color.White;
        _rotation = 0.0f;
        _size = 1.0f;
        _spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend);
        _spriteBatch.DrawString(_spriteFont, s, new Vector2(x, y), _color, _rotation, new Vector2(), _size, SpriteEffects.None, 1.0f);
        _spriteBatch.End();
    }

still the image is getting really blurry.. i have no idea why...

i'm talking about somethinglike this

enter image description here

does anyone knows why this could be? i have searched through everything and the closest answer i got is that if the sprite or spritefont position is a float (non exact int) the result will be alliased... but this is not the case here

Cheers!

I uploaded the XNB sprite font https://skydrive.live.com/redir?resid=50E25A0EEED51C3C!241&authkey=!AAvw-i5OtipT8fo if anyone is interested in trying this

Heavy_Bullets
  • 518
  • 1
  • 4
  • 13
  • Just a stab in the dark, try setting SamplerState.PointClamp in SpriteBatch.Begin. – craftworkgames Aug 29 '13 at 09:58
  • did that.. didn't change much... XNA shows no problems when doing this – Heavy_Bullets Aug 29 '13 at 16:19
  • Oh? In that case I think you've found a bug in MonoGame. Report it on the MonoGame forums and perhaps link back to this question. – craftworkgames Aug 29 '13 at 23:56
  • Have you tried to change the spritefont and see if the blur effect remains? – pinckerman Aug 30 '13 at 01:08
  • I changed the font properties and also re compiled the xnb file, no changed... will try again in the afternoon (this notebook doesn't have mono installed) – Heavy_Bullets Aug 30 '13 at 15:36
  • On monogame i got this reply: Ya it looks weird on mine as well. (Windows DX) I've seen this before (Like in general not in MG)... it looks like incorrect flipping of a DXT texture. – Heavy_Bullets Aug 30 '13 at 15:39
  • Try drawing a background behind your string, it seems so strange, I've drawn strings so many time and I've never had any problem. – pinckerman Aug 31 '13 at 00:07
  • Check to see if your X/Y positions are whole numbers. if they arnt round them to the nearest integer. –  Oct 15 '13 at 14:00
  • are you drawing any thing else to the screen at the same time? as I was getting a similar issue due to the drawing order in xna – Iain Brown Jan 15 '14 at 18:20
  • Are you using a released version of monogame or building against develop? If its develop, make sure you pull down the latest and try running/building against it. If its not develop... well maybe try develop. – James Jan 10 '15 at 03:20
  • I’m voting to close this question because the problem has been resolved upstream. –  Dec 23 '22 at 00:56

1 Answers1

0

This issue should be fixed in 3.8.1.