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

Author Topic: 1 pixel wide outline of transparency area bleeding through after rotate or zoom.  (Read 2817 times)

0 Members and 1 Guest are viewing this topic.

KoeKhaos

  • Newbie
  • *
  • Posts: 10
    • View Profile
I'm using CodeBlock with Mingw on Window 8 with SFML 2.1 with nvidia graphics card. I wasn't sure if it was something to do with the graphics or the window module so I just put it in general. Hope that's ok!

The problem is that a 1 pixel wide outline shows up around my sprite the moment I do a sprite.rotate() or a view.zoom(). It doesn't happen if I turn off setSmooth on the texture. The outline appears to be magenta, which I mask out from the original bmp image. Doing a sprite.move() does not make the outline appear, however.

I searched and found similar topics of the exact problem but in them it indicated that it was fixed in SFML 2 so I was wondering if the problem somehow has returned or if I am missing something. The sprite looks like crap without setSmooth on so I'd like to be able to use it if possible!

Edit: I created a PNG with built in transparency and it still gets a pink outline when sprite.rotate or view.move is setSmooth is enabled for it!

Thanks!
Joe
« Last Edit: March 09, 2015, 10:28:13 pm by KoeKhaos »

KoeKhaos

  • Newbie
  • *
  • Posts: 10
    • View Profile
I read another post by Laurent mentioning about floating point. My application uses a spaceship so it does lands on floating point locations. Does this mean that non pixel perfect, is that the right term, objects will simply not display right when setsmooth(antialiasing?) is enabled and the sprite is not precisely centered on a pixel?

Voroz

  • Full Member
  • ***
  • Posts: 128
    • View Profile
I remember having the same problem with setsmooth, so i always disable it for everything and if i want anti-aliasing i do it in a paint program. Just make sure that it uses transparency pixels for the anti-aliasing.

KoeKhaos

  • Newbie
  • *
  • Posts: 10
    • View Profile
Apparently I am missing something about anti-aliasing. I was under the impression it was a method of smoothing transformed objects during runtime and not simply an art style... So is the setsmooth simply not used by anyone?

 

anything