diff --git a/lib/util.lua b/lib/util.lua index 5fefa1b..da73afa 100644 --- a/lib/util.lua +++ b/lib/util.lua @@ -10,6 +10,12 @@ function util.drawCanvasToCanvas(canvas, other_canvas, options) if options["shader"] then love.graphics.setShader(options["shader"]) end + if options["stencil"] then + love.graphics.setInvertedStencil(options["stencil"]) + end + if options["istencil"] then + love.graphics.setInvertedStencil(options["stencil"]) + end if options["color"] then love.graphics.setColor(unpack(options["color"])) else @@ -22,6 +28,12 @@ function util.drawCanvasToCanvas(canvas, other_canvas, options) if options["shader"] then love.graphics.setShader() end + if options["stencil"] then + love.graphics.setInvertedStencil() + end + if options["istencil"] then + love.graphics.setInvertedStencil() + end end) end