camera - libgdx tiledmap flicker with Nearest filtering -
i having strange artifacts on tiledmap while scrolling camera clamped on player (who box2d-body).
before getting issue used linear filter tiledmap prevents strange artifacts happening results in texture bleeding (i loaded tiledmap straight .tmx file without padding tiles).
however using nearest filter instead gets rid of bleeding when scrolling map (by walking character cam clamped on him) seams lot of pixel flickering around. flickering results can better or worse depending on cameras zoom value. when use "orthocamcontroller" class libgdx-utilities allows scroll map panning mouse/finger don't these artifacts @ all. assume flickering might caused bad camera-position values received box2d-body's position. 1 more thing should add here: game instance runs in 1280*720 display mode while gamecam renders 800*480. wen change gamecam's rendersolution 1280*720 don't artifacts tiles way tiny.
has experienced issue or knows how fix that? :)
i had similar problem this, , found due having small decimal value camera position.
i think may happening sort of rounding tile columns/rows in tilemap renderer.
i fixed rounding set accuracy, so:
camera.position.x = math.round(player.entity.getx() * scaleposition) / scaleposition;
experiment various values, got working using tile size scaleposition value.
Comments
Post a Comment