Sets the blending mode.
love.graphics.setBlendMode( mode )
BlendMode modeNothing.
Available since LÖVE 0.10.0
This variant is not supported in earlier versions.
love.graphics.setBlendMode( mode, alphamode )
BlendMode modeBlendAlphaMode alphamode ("alphamultiply")Nothing.
The default "alphamultiply" alpha mode should normally be preferred except when drawing content with pre-multiplied alpha. If content is drawn to a Canvas using the "alphamultiply" mode, the Canvas texture will have pre-multiplied alpha afterwards, so the "premultiplied" alpha mode should generally be used when drawing a Canvas to the screen.
function love.load()
love.graphics.setBackgroundColor(54, 172, 248)
end
function love.draw()
love.graphics.setBlendMode("alpha") --Default blend mode
love.graphics.setColor(230, 44, 123)
love.graphics.rectangle("fill", 50, 50, 100, 100)
love.graphics.setColor(12, 100, 230)
love.graphics.setBlendMode("multiply")
love.graphics.rectangle("fill", 75, 75, 125, 125)
end
© 2006–2016 LÖVE Development Team
Licensed under the GNU Free Documentation License, Version 1.3.
https://love2d.org/wiki/love.graphics.setBlendMode