local SCREEN_EMULATED_WIDTH, SCREEN_EMULATED_HEIGHT = 320, 240
local SCREEN_WIDTH, SCREEN_HEIGHT = love.graphics.getDimensions()
local SCREEN_SCALE_X, SCREEN_SCALE_Y = SCREEN_WIDTH/SCREEN_EMULATED_WIDTH, SCREEN_HEIGHT/SCREEN_EMULATED_HEIGHT
function love.draw()
love.graphics.push()
love.graphics.scale(SCREEN_SCALE_X, SCREEN_SCALE_Y)
frame.draw()
love.graphics.pop()
end
For example, I'm using this image:
And it's supposed to be displayed like this:
But instead of that it's becoming smoothened:
Is there any other convenient way in LÖVE to scale graphics without smoothing it?
You can use [wiki](Image):setFilter[/wiki] with "nearest" for the magnification filter argument. If you ever upscale a Canvas or printed text, you can do the same thing via [wiki]Canvas:setFilter[/wiki] and [wiki]Font:setFilter[/wiki] (or just use [wiki]love.graphics.setDefaultFilter[/wiki] before creating any Images/Canvases/etc.)