Canvas is rendered in "alpha" blendmode...
Germanunkol opened this issue · comments
... and I think it should be "premultiplied" instead.
Here's an example of what it looks like when rendering a short text:
And this is what it should look like instead:
This happens because the text is rendered onto the canvas in "alpha" blendmode and then rendered again onto the screen in the "alpha" mode as well.
Instead, something like this solves the problem:
function rich:draw(x, y)
local firstR, firstG, firstB, firstA = love.graphics.getColor()
love.graphics.setColor(255, 255, 255, 255)
local prevMode = love.graphics.getBlendMode()
if self.framebuffer then
love.graphics.setBlendMode("premultiplied")
love.graphics.draw(self.framebuffer, x, y)
love.graphics.setBlendMode(prevMode)
else