ID:2392314
 
BYOND Version:512.1446
Operating System:Windows 10 Home 64-bit
Web Browser:Chrome 68.0.3440.106
Applies to:Dream Seeker
Status: Verified

A member of our crack team of bug testers has verified that this issue is reproducible, and has handed it off to the development team for investigation.
Basically, when you use transform, any anti-aliasing you get darkens the color of the pixels. It's been this way since forever.



I know why the anti-aliasing happens, but I don't like how it uses darker pixels instead of strictly less-transparent pixels of the same color.

There also isn't any AA for the pixels at the edge of the icon, such as the base of the arrow.

I know that PIXEL_SCALE prevents AA entirely, but in cases where the smoothness is desired, that's not exactly a workaround.
Any chance you could shoot me a quick demo for this?

I suspect I know what the problem is, but it'd be nice to have some confirmation there. I think the issue is basically that the bilinear sampling is getting values at the edge such as (0.75,0.75,0.75,0.75) which are obviously going to be wrong for blending directly. If the transform happened inside of a temporary surface however so that the result were drawn using premultiplied alphas and the appropriate blending for that, it should work fine. So that might be something I need to look into trying.

I could of course simply premultiply the alpha when loading the textures, which would simplify a crapload of things, but I don't like that for a number of reasons--mainly loss of fidelity.
I found a workaround you can employ for now:

maptext = " "

Because of the transform, this causes a virtual KEEP_TOGETHER which draws the icon and the maptext (in this case empty) onto a temporary surface, which is then blended using premultiplied alpha.
Lummox JR changed status to 'Verified'