Thursday, June 7, 2012

Outline fix (Hurray!)


I'm happy to say that the outline of magnified (enlarged) sprites is now fixed. As that one took much more time to fix that I thought (since I've been on this point since several weeks now.), I'm quite happy to say that those white artefacts are now an old story.
For some odd reason, I wrongly thought it came from the coordinate system used for the map mode, and I've trying workarounds and fixes in that area for some time already, without realizing that the smoothing method (GL_LINEAR) was simply using the RGB values of the nearest transparent pixels, leading to those white and grey edges on sprites borders. Here is the result:

If you look carefully, you'll notice the white outline on the left, black on the right.

Might sound simple for some OpenGL experts out there, but I'm pretty glad to see this fixed.

Best regards,


  1. Nice! Those white lines were annoying.

    1. Thanks a lot. AS told in the post, that was kinda hard to figure out, but obvious once you know. Funny, isn't it?

  2. I remember working on that one myself a while back. Obviously I never found out what the problem was, but had the same suspicions that you did (initially thought it was something in MapMode, then thought it could be something wrong with the graphics engine). Awesome job on fixing this one! I know first hand just how tough of a bug that one was. :)