'Pixel art not drawing properly on screen when in motion

When camera zoom is 1f

When camera zoom is 1.31f (view is distorted)

The reason it's like this is because I'm using the nearest filter. I have to use nearest filter for pixel art.

I want the map to look properly at different zooms.

in first video, 1 unit equals 4 pixels(world is 320x180, screen is 1280x720) and there is no problem as there is integer scaling. but since I use zoom it is not possible to always keep the scale at the integer number.

Any ideas on how to properly draw pixel art with libgdx?



Solution 1:[1]

You can use a count over a case expression to check how many "VERIFIED" or "REQUESTED" values are in the table:

SELECT *
FROM   documents i
JOIN   (SELECT   id
                 COUNT(CASE status WHEN 'VERIFIED' THEN 1 END) AS count_verified,
                 COUNT(CASE status WHEN 'REQUESTED' THEN 1 END) AS count_requested
        FROM     invites
        GROUP BY id) i ON d.invite_id = i.id AND
                          count_verified > 0 AND
                          count_requested = 0

Solution 2:[2]

I have found a solution with EXCEPT (MINUS) SQL construct

(SELECT invites.id, invites.invited_by FROM invites 
INNER JOIN documents
ON invites.id=documents.invite_id
GROUP BY (invites.id)
)
EXCEPT
(SELECT invites.id, invites.invited_by  FROM invites 
INNER JOIN documents
ON invites.id=documents.invite_id
WHERE documents.status='REQUESTED'
GROUP BY (invites.id)
)) 

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Mureinik
Solution 2 Ali Asad Sahu