Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: blitzer on February 24, 2015, 06:06:49 AM

Title: Question on "Jittering Edges" when Moving Sprites (Anti-Aliasing Issue?)
Post by: blitzer on February 24, 2015, 06:06:49 AM
Hello everyone, I'm working on making a "looping scroll" background that scrolls and eventually loops back to the first image, which is straight forward enough. However, I'm coming across a problem where, when moving the widgets, the edges of the widgets shake/jitter a bit as they move across the screen.

I made a quick video that hopefully shows this clearly enough:
https://www.youtube.com/watch?v=CanCkPDuxJY (https://www.youtube.com/watch?v=CanCkPDuxJY)

Obviously, the rotated sprite has aliasing issues, and I'm guessing that even the "aligned" sprites issue is still from aliasing? I guess I've just never noticed it happen on "aligned" textures before, just looking for someone to confirm or deny that conclusion.

Any ideas appreciated, thank you for reading.
Title: Re: Question on "Jittering Edges" when Moving Sprites (Anti-Aliasing Issue?)
Post by: ArenMook on February 24, 2015, 11:43:32 AM
What version of NGUI are you using? When scrolling stuff you should ensure that you're using whole integer values for positions, otherwise pixels will fall in-between of actual screen pixels, leading to undesired results. Do actual tween lerping in floats, but when setting the transform position use rounded values.
Title: Re: Question on "Jittering Edges" when Moving Sprites (Anti-Aliasing Issue?)
Post by: blitzer on February 24, 2015, 11:59:33 PM
What version of NGUI are you using?
-> 3.7.4

Basically what I'm doing is calling UIScrollView.MoveRelative(my offset), so substituting a mouse drag with code. I figured that was the "safest" way of doing it since it uses methods NGUI already implemented.

My hierarchy for doing this:
Panel[UIPanel, UIScrolView]
-WrappedObjectsParent[UIWrapContent]
--Sprite1
--2
--etc.
Title: Re: Question on "Jittering Edges" when Moving Sprites (Anti-Aliasing Issue?)
Post by: ArenMook on February 27, 2015, 04:35:17 AM
Please update. 374 is very old. If this is the issue I'm thinking of, it was fixed many months ago.