Page 1 of 1

[SOLUTION TO] the very little image stretching problem.

Posted: Fri Mar 30, 2007 19:48
by Pompei2
Hello,

As now I'm going into Look'n'Feel skinning, I experienced the problem that has been addressed a few tims here already: when you stretch a very little image that has only one color, it gets a gradient in a x form.

But I can't find any of those threads !

I found a solution to that problem and don't remember if there was one at one of those threads, so I create a new one and hope it will help someone :)

The x gradient comes from the texture filter that is used: GL_LINEAR. This one always calculates an average of the surrounding tiles to calculate a color. GL_NEAREST would solve the problem, but a simpler solution is to color the surrounding tiles of image with the same color as the image itself (in the imageset), but don't include them in the image. This solves the problem. I hope I was clear and I helped someone :)

Posted: Sat Mar 31, 2007 09:22
by scriptkid