Open tomlum opened 5 years ago
I just noticed this and it's a bummer, the cause is probably that it's using the same canvas internally and it wipes it clean before using any effect.
moonshine uses double buffering (see moonshine.draw_shader() and chain.draw(). From what I understand this seems to be a issue with the blend mode. Can you check if changing the blend mode in init.lua:75 to this fixes the issue?
love.graphics.setBlendMode("screen", "premultiplied")
Tried that but it doesn't seem to work. I also tried the other blend modes just in case.
Can you please give a code example that produces the bug? On my end, this will only show the second rectangle with blend mode "alpha"
in init.lua, but both rectangles with blend "screen"
:
function love.load()
blur1 = moonshine(moonshine.effects.boxblur)
blur2 = moonshine(moonshine.effects.boxblur)
end
function love.draw()
blur1(love.graphics.rectangle, 'fill', 100, 100, 100, 100)
blur2(love.graphics.rectangle, 'fill', 220, 100, 100, 100)
end
Hey! I'm running love 11.2 on a mac, and whenever I try to layer on blurs like this
anything before the second blur just turns to white. Am I misunderstanding how this is supposed to work? Are these shaders not stackable?
Thanks!