SFML community forums

Help => Graphics => Topic started by: N1ghtly on February 22, 2012, 09:42:03 am

Title: Sprite "smearing"?
Post by: N1ghtly on February 22, 2012, 09:42:03 am
I was working on my stats screen for my game, just prototyping it but when I draw certain sprites it looks like they're "smeared" a bit.

(http://i44.tinypic.com/24vjt3c.png)

Any ideas?
Title: Sprite "smearing"?
Post by: Laurent on February 22, 2012, 11:04:15 am
Could you elaborate on what "smeared" means? :D
Title: Sprite "smearing"?
Post by: N1ghtly on February 22, 2012, 12:59:24 pm
Haha I guess it's a word I made up :P
Look at the + and - circle for example :)
Title: Sprite "smearing"?
Post by: Laurent on February 22, 2012, 01:05:47 pm
Quote
Look at the + and - circle for example

Looks like bad alpha around borders in the original image.
Title: Sprite "smearing"?
Post by: N1ghtly on February 22, 2012, 05:01:56 pm
That's not it because in-game they work perfectly :/
Title: Sprite "smearing"?
Post by: Laurent on February 22, 2012, 07:03:55 pm
What's the difference between the menu and the game?

Maybe it's because the background is different, it shows more on black.
Title: Sprite "smearing"?
Post by: N1ghtly on February 23, 2012, 04:08:37 pm
It can't be the sprites themselves, they're crisp and clean. :(
Title: Sprite "smearing"?
Post by: Laurent on February 23, 2012, 04:11:39 pm
Can you upload them?
Title: Sprite "smearing"?
Post by: N1ghtly on February 23, 2012, 04:25:42 pm
sure!

(http://i40.tinypic.com/30ky8es.png)
(http://i41.tinypic.com/j6mkbq.png)
(http://i41.tinypic.com/kb5300.png)
Title: Sprite "smearing"?
Post by: Laurent on February 23, 2012, 04:37:03 pm
Have you tried to disable smoothing (image.SetSmooth(false))?
Title: Sprite "smearing"?
Post by: N1ghtly on February 24, 2012, 03:32:07 pm
I thought it was disabled on default?
Title: Sprite "smearing"?
Post by: Laurent on February 24, 2012, 03:46:32 pm
By default it is disabled in SFML 2, but enabled in SFML 1.6.
Title: Sprite "smearing"?
Post by: N1ghtly on February 24, 2012, 06:45:15 pm
I'm using SFML 2 so it's disabled :)
Title: Sprite "smearing"?
Post by: Laurent on February 24, 2012, 08:26:11 pm
Can you write a complete and minimal code that reproduces the problem, so that I can test it?
Title: Sprite "smearing"?
Post by: N1ghtly on February 25, 2012, 03:36:17 pm
I was able to fix the problem :)
I used one temporary sprite to load them all into a vector and I forgot to pass true to the SetTexture function each time (to reset the drawing rect).