Pink pixels around sprite in AGS 3.6.2.10

Started by Honza, Tue 27/05/2025 08:50:35

Previous topic - Next topic

Honza

Yesterday I upgraded to AGS 3.6.2.10, and now the alpha channel doesn't seem to work properly for certain sprites - I can see pink pixels around the sprite:



This only happens with some sprites (so far I have noticed it in the front and back views of the character, not the side views) and when the sprite is scaled (looks ok at 100% scale). Here are the sprite properties in case that's relevant:


jahnocli

I'm a beginner here, but I would guess this is anti-aliasing at work...
Life is a puzzle, a quest and an adventure

Honza

#2
Well, switching off anti-alias for scaled sprites (at least I assume that's what "smooth scaled sprites" stands for in the setup?) gets rid of the pink pixels, but of course also makes the sprites too pixelated - can't use that.

Switching from "nearest-neighbour" to "linear interpolation" scaling filter also removes the pink, but it makes the sprites too blurry.

Danvzare

I've encountered a similar issue whenever I use a colour with the following values: R:255 G:0 B:255 Alpha:0
I think it's a problem caused by the magic-pink being used to force transparency conflicting with the actual transparency.

I personally make sure all of the transparency in the sprite isn't magenta whenever I use actual alpha transparency. I usually use white, black, grey or something like that. To do that, I just put in a background layer with the follow values: R:128 G:128 B:128 Alpha:1 and then combine the layers, use the magic wand to select the transparent area, and delete it. (There's probably a better way though.)

Honza

#4
Quote from: Danvzare on Tue 27/05/2025 11:07:11I've encountered a similar issue whenever I use a colour with the following values: R:255 G:0 B:255 Alpha:0
I think it's a problem caused by the magic-pink being used to force transparency conflicting with the actual transparency.

And was it an issue in previous versions of AGS as well? Because for me everything worked perfectly fine until I updated yesterday. Either I'm overlooking a setting somewhere or the anti-aliasing method has changed between AGS versions (I switched from 3.6.0.50 to 3.6.2.10).

Crimson Wizard

Could you upload a single sprite that has this issue for us to try in both old and new versions?

Honza


Crimson Wizard

#7
@Honza, alright, this appeared to be simply a messed up setting inside a renderer. The mistake occurs with the following combination of options:
- nearest neighbour filter (not with linear one)
- smooth scaled sprites on

Please try the following temp build and see if it fixes all occurrences of pink pixels:
https://cirrus-ci.com/task/5264716513148928

Honza

Thank you, I tried it and the pink pixels are still there.


Crimson Wizard

Quote from: Honza on Yesterday at 22:01:44I tried it and the pink pixels are still there.

Are you sure that you rebuilt and ran with that new version? I compared the one before and this new one, and earlier had pink pixels, while I do not see any with the one linked above.

Honza

Quote from: Crimson Wizard on Yesterday at 22:06:54Are you sure that you rebuilt and ran with that new version? I compared the one before and this new one, and earlier had pink pixels, while I do not see any with the one linked above.

I hope so! I downloaded the installer from the "Artifacts" section in your link, renamed the old AGS folder, then installed the new version and ran it from the new folder. I used "rebuild all files" for good measure when compiling the game, ran it and took the screenshot.

Crimson Wizard

Is it possible to get the compiled game, in case it differs from my test?

Honza

No problem! Can I DM you a link on Discord?

Crimson Wizard

Quote from: Honza on Yesterday at 22:25:55No problem! Can I DM you a link on Discord?

I can't get to discord at the moment, could you PM me on forums instead?

Crimson Wizard

I found and fixed another mistake, it only affected player character view, because it was precached before the "smooth sprites" option was initialized properly.

Here's the link to the next test build:
https://cirrus-ci.com/task/6171769649758208

SMF spam blocked by CleanTalk