-- MSAA enable scroll test on love2d function love.load() limits = love.graphics.getSystemLimits() love.graphics.setDefaultFilter("nearest", "nearest") img0 = love.graphics.newImage("bgtile.png") love.graphics.setDefaultFilter("linear", "linear") img1 = love.graphics.newImage("bgtile.png") local w, h w, h = love.graphics.getDimensions() settings = {} settings.msaa = 0 canvas0 = love.graphics.newCanvas(w, h, settings) settings.msaa = 16 canvas1 = love.graphics.newCanvas(w, h, settings) y = 32 end function love.update(dt) y = y + 2.0 * dt end function love.draw() love.graphics.clear(0.25, 0.41, 0.88, 1.0) h = img0:getHeight() love.graphics.setCanvas(canvas0) love.graphics.clear() love.graphics.setColor(1.0, 1.0, 1.0, 1.0) love.graphics.draw(img0, 0, y) love.graphics.setCanvas(canvas1) love.graphics.clear() love.graphics.setColor(1.0, 1.0, 1.0, 1.0) love.graphics.draw(img1, 322, y) love.graphics.setCanvas() love.graphics.draw(canvas0, 0, 0) love.graphics.draw(canvas1, 0, 0) love.graphics.print("FPS: " .. tostring(love.timer.getFPS()), 2, 2) love.graphics.print("MSAA limit : " .. limits["canvasmsaa"], 2, 20) local tx = 320 - 8 * 7 love.graphics.print("nearest", tx, 40) love.graphics.print("MSAA: " .. tostring(canvas0:getMSAA()), tx, 60) tx = 328 love.graphics.print("linear", tx, 40) love.graphics.print("MSAA: " .. tostring(canvas1:getMSAA()), tx, 60) end function love.keypressed(key, isrepeat) if key == "escape" then -- ESC key to exit love.event.quit() end end