Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Sprite "smearing"?  (Read 4478 times)

0 Members and 1 Guest are viewing this topic.

N1ghtly

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
Sprite "smearing"?
« 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.



Any ideas?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Sprite "smearing"?
« Reply #1 on: February 22, 2012, 11:04:15 am »
Could you elaborate on what "smeared" means? :D
Laurent Gomila - SFML developer

N1ghtly

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
Sprite "smearing"?
« Reply #2 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 :)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Sprite "smearing"?
« Reply #3 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.
Laurent Gomila - SFML developer

N1ghtly

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
Sprite "smearing"?
« Reply #4 on: February 22, 2012, 05:01:56 pm »
That's not it because in-game they work perfectly :/

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Sprite "smearing"?
« Reply #5 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.
Laurent Gomila - SFML developer

N1ghtly

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
Sprite "smearing"?
« Reply #6 on: February 23, 2012, 04:08:37 pm »
It can't be the sprites themselves, they're crisp and clean. :(

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Sprite "smearing"?
« Reply #7 on: February 23, 2012, 04:11:39 pm »
Can you upload them?
Laurent Gomila - SFML developer

N1ghtly

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
Sprite "smearing"?
« Reply #8 on: February 23, 2012, 04:25:42 pm »
sure!




Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Sprite "smearing"?
« Reply #9 on: February 23, 2012, 04:37:03 pm »
Have you tried to disable smoothing (image.SetSmooth(false))?
Laurent Gomila - SFML developer

N1ghtly

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
Sprite "smearing"?
« Reply #10 on: February 24, 2012, 03:32:07 pm »
I thought it was disabled on default?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Sprite "smearing"?
« Reply #11 on: February 24, 2012, 03:46:32 pm »
By default it is disabled in SFML 2, but enabled in SFML 1.6.
Laurent Gomila - SFML developer

N1ghtly

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
Sprite "smearing"?
« Reply #12 on: February 24, 2012, 06:45:15 pm »
I'm using SFML 2 so it's disabled :)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Sprite "smearing"?
« Reply #13 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?
Laurent Gomila - SFML developer

N1ghtly

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
Sprite "smearing"?
« Reply #14 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).

 

anything