• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Windows "Interpolate Colors" issues. Transparent pixels always default to black

Khao

Member
So, when using interpolate colors between pixels, a black border appears around most of my sprites. After a bit of research, I realized that this is because of the color of transparent pixels; the interpolation process picks up the color of the transparent pixels when trying to smooth out the edges of the sprites, and then the pixels appear way darker than they should.

The solution offered to every single person I see who asked that question, is to manually change the color of the transparent pixels to the color of the actual sprite.

...But at least in the current version of GMS2, this is impossible.

Using the color picker on the image editor, you can tell that transparent pixels are always black. Pure #000000. If you pick another color, bring the alpha all the way down, and paint the pixels with that color... Well, nothing will happen. The color will remain black. Nothing happens when using the color replacement tool either. The transparent pixels will stay black, no matter what.

I know for a fact that this is now how transparent colors worked up to GMS1.4, as in hindsight, I remember running into this problem on an older project and fixing by just changing the transparent pixels. But this is now impossible, and the interpolation function becomes kind of useless because of this issue. If I rotate my pixels, or use decimals on the X and Y values (or in the view), every sprite will interpolate its borders to black. Even a flat red sprite over a flat red background will have darker edges, when it should logically be invisible.

I don't know how else to fix this. I know a lot of people speak against the use of the interpolation feature, but these people usually only work on pixel-art projects. If you use just about anything other than pixel art, color interpolation is a must, or moving object will look highly unnatural and pixellated.

I can't find anything on texture clamping either, which would also theoretically solve the problem. So am I missing something? Is there an alternative?
 
Top