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

Author Topic: Ugly edges with smoothing enabled  (Read 2004 times)

0 Members and 1 Guest are viewing this topic.

Dlaor

  • Newbie
  • *
  • Posts: 15
    • View Profile
Ugly edges with smoothing enabled
« on: December 25, 2010, 11:34:06 pm »
I'm making my first game using SFML but I've been getting some bugs with sprites. The images get an ugly edge at the sides when smoothing is enabled. Here's a picture which demonstrates the problem.

As you can see, the ball on the left has an ugly white edge at the top and at the side. The one on the right is the desirable result.

I know that setting smooth to false fixes it, but I still want to have smooth graphics. How do I fix this? (using SFML 1.6)

Stew_822

  • Newbie
  • *
  • Posts: 16
    • View Profile
    • http://circean-studios.co.cc
    • Email
:(
« Reply #1 on: January 01, 2011, 11:22:54 pm »
As far as I'm aware, those are the only two options available to you :(

But you never know, someone smarter than me might come along and find a fix :)

Could you possibly smooth your graphics before even loading them into your game? ie. do it in the image editor?
It's better to keep your mouth shut and give the impression that you're stupid than to open it and remove all doubt.

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Ugly edges with smoothing enabled
« Reply #2 on: January 02, 2011, 02:45:07 pm »
The Edge comes from the image border right? Just have the image 10 x 10 bigger move it, smooth and then move back and resize or something like that. Though easier would be to implement a gaussial blur shader and use that.
Developer and Maker of rbSFML and Programmer at Paradox Development Studio