love
love copied to clipboard
Canvas rendering issue with Metal in 12.0
Löve 12.0 - MacOSX - Monteray 12.5.1 - Mac Studio (2022)
Came across some weird rendering artifacts when testing canvas drawing in 12.0 with the Metal renderer on a new(ish) Mac. Drawing canvases draws a bunch of weird flickering artifacts around the edge of where the canvas is drawn.
This doesn't happen for me with the same code in 11.4, and also doesn't happen in 12.0 when t.renderers = {"opengl"} is set in the conf.lua
main.lua:
love.load = function()
Canvas = love.graphics.newCanvas(32, 32)
end
love.draw = function()
love.graphics.clear(0, 0, 0, 1)
love.graphics.setCanvas(Canvas)
love.graphics.clear(255, 255, 255, 1)
love.graphics.setCanvas()
love.graphics.draw(Canvas, 0, 0, 0, 4, 4)
end
When run you'll see a bunch of flickering artifacts around the outside of where the canvas is drawn - moving the canvas moves the artifacts, it's always in the area nearby. Changing the size/scale of the canvas or what was drawn to the canvas had doesn't seem to affect it. Multiple canvases give multiple effects (it's kinda sick ngl)
Example visual attached https://github.com/love2d/love/assets/77150506/eb9fb955-1a6d-49d4-9be8-b08032f5c557
Tried replication with a couple other machines, an old Macbook Pro w/ Intel Iris and an old iMac w/ AMD Radeon - both ran fine without seeing any artifacts at all, so might be specific to the Apple M1 Max chip
Not sure if helpful but the MBP listed Metal Support as "Metal GPUFamily macOS 1", the iMac listed it as "Metal GPUFamily macOS 2" but the Mac Studio lists it as "Metal GPUFamily Apple 7"