libgdx / libgdx

Desktop/Android/HTML5/iOS Java game development framework
http://www.libgdx.com/
Apache License 2.0
23.37k stars 6.44k forks source link

Pixel perfect rendering does not work when camera zoom is non whole number #6418

Closed bryanbrunt closed 3 years ago

bryanbrunt commented 3 years ago

I could provide a youtube video if necessary. I posted a video in the Help-1 discord channel on 2/15.

When rendering an animation class across multiple frames, odd pixel deformations occur in a seeming random manner when the camera zoom factor is large and a non-whole number, such as 4.5. With a whole number the rendering appears to be pixel perfect.

I'm rendering simply 16x32 graphics png animations.

The animations are drawn to screen via batch in the simplest way possible.

batch.draw(frame, x, y)

The camera is OrthographicCamera with an ExtendedViewport.

mgsx-dev commented 3 years ago

Please don't bypass the template and provide necessary information. Not everybody here is on Discord and we won't dig to find your post. :-) What you describe sounds like how pixels rasterization work, you can't get more than one pixel in a pixel. Feel free to reopen with enough information if you think it's a libGDX bug.