1
Graphics / Sprite jitter due to loss of floating point precision?
« on: August 24, 2013, 03:00:59 am »
I've been working on a game that takes place in space, and I figure that I could generally just map game coordinates straight to sprite coordinates using sf::Vector2f's, then center a view on that position. However, when coordinates get large (over a million), there's a real noticeable sprite jitter and tearing effect that just gets worse with distance.
My best guess is that this is from a loss of floating point precision, so I'm just going to build a local coordinate system and use that to make points relative around 0,0. I'm at least wondering if this is a known issue (or actually a cause of something else) and to make note that I believe this issue can still lend to slight pixel flickering even at reasonably low coordinates (when rotating a sprite every frame).
My best guess is that this is from a loss of floating point precision, so I'm just going to build a local coordinate system and use that to make points relative around 0,0. I'm at least wondering if this is a known issue (or actually a cause of something else) and to make note that I believe this issue can still lend to slight pixel flickering even at reasonably low coordinates (when rotating a sprite every frame).