Page 1 of 1

Choppy transform (subpixel rendering not working?)

Posted: Wed Nov 07, 2018 7:14 am
by fullmontis
I have a transform that works as follows:

Code: Select all

transform breathing:
    subpixel True
    ypos 720
    yanchor 1.0
    ease 0.4 ypos 723
    ease 1.0 ypos 720
    repeat
I notice that the transform is choppy, meaning that you can see the sprite jump from one pixel to another when rendered. Since I used subpixel rendering I thought this would go away, but it is still there.

Is there a solution to make a transform like this more fluid? Thanks :D

Re: Choppy transform (subpixel rendering not working?)

Posted: Sun Nov 11, 2018 12:02 am
by PyTom
Write:

Code: Select all

transform breathing:
    subpixel True
    ypos absolute(720)
    yanchor 1.0
    ease 0.4 ypos absolute(723)
    ease 1.0 ypos absolute(720)
    repeat
If you give it an integer argument, you're only going to get integers. If you give it absolute, you'll get pixel floats, which are needed for such small movements.

Re: Choppy transform (subpixel rendering not working?)

Posted: Wed Nov 14, 2018 10:06 am
by fullmontis
Thank you Tom, works perfectly! I didn't know it was possible to pass floats to position arguments, this is really handy :-D