Relative Scale mode ( Mixed pixels glitch )

59 views
Skip to first unread message

Matt

unread,
May 6, 2015, 5:24:56 PM5/6/15
to haxef...@googlegroups.com

I noticed some glitch/bug in haxe flixel (Neko/windows) didn't test others, i'm using  FlxG.scaleMode = new RelativeScaleMode(3, 3);  , when i used image 203x106 some pixles are not upscaled properly to 3x3 resulting in mixed pixels, but when i adjusted the image so that there is no odd number in image size and the image upscaled properly. Note : This is not the only instance , this happend with other assets that had odd number of pixels in width ( i think its also height ).

Could there be issues that Relative scale mode has problem with rounding up the odd numbers on screen when it upscales ?


Left : No mixed pixels   Right : Mixed pixels


SruloArt

unread,
May 7, 2015, 4:19:50 AM5/7/15
to haxef...@googlegroups.com
It's not a bug, but actually a target limitation (called sub-pixel rendering, look it up), just don't use odd numbers and you should be fine (plus you can always tweak the rounding using the pixelperfect Position/Render FlxSprite's fields). 

Matt

unread,
May 7, 2015, 7:28:13 AM5/7/15
to haxef...@googlegroups.com
I tried to enable pixel perfect rendering and i tried to change _point.floor(); to _point.celi();  but there is no difference it still does subpixel rendering. Is there anything else i could try? Also why is this a target limitation.
Reply all
Reply to author
Forward
0 new messages