raylib icon indicating copy to clipboard operation
raylib copied to clipboard

[texture] background scrolling feels shaky / shaking

Open lmezg opened this issue 11 months ago • 1 comments

When scrolling the background with the method in this example https://www.raylib.com/examples/textures/loader.html?name=textures_background_scrolling

if you stare at the slow moving background in the back, you will see its shaky. once you noticed it, it's hard to unseen it. I think this is probably due to floating point rounding to integer and we can only shift the background by integers. This is also why fast moving background looks less shaking. I wonder if you have any suggestions on how to eliminate this issue ? (i need to scroll some backgrounds slowly).

lmezg avatar Dec 20 '24 18:12 lmezg

This is a good starting place: https://jorenjoestar.github.io/post/pixel_art_filtering/ A better place to ask about these kind of things is raylib discord. Github issues are for a different purpose.

veins1 avatar Dec 20 '24 18:12 veins1

Afaik, it is drawing using float positions so issue could be platform/os/gpu/drivers dependand and impossible to address on raylib side.

raysan5 avatar Dec 23 '24 18:12 raysan5

tldr: the screen size has to be multiples of the images size fyi: https://gamedev.stackexchange.com/questions/157011/strange-warping-shimmering-effect-with-unity-tilemap-and-cinemachine

lmezg avatar Dec 31 '24 17:12 lmezg