Hey guys, I’m trying to smudge an image by copying a 10 pixel image and moving it pixel by pixel and drawing it to the screen, I’ve taken advantage of the blur shader to make it more smudge like, but anything I draw with low opacity (e.g. the outer of the blur) becomes darker, instead of mixing. I was going to take advantage of the color.blend function and use img:get and img:set to blend these pixels, but the way I’m using seems to be more efficient. Here’s the code, how can I stop it from darkening and instead just blend the pixels with the background of the copied 10pixel image?
local spos = (smudgepos-vec2(td.x,td.y)):normalize()*-1
smudgepos = smudgepos+spos
setContext(screen)
local m = mesh()
local size = 15-smudgepos:dist(prev)/3
local r = m:addRect(smudgepos.x,smudgepos.y,size,size)
m.texture = smudgeimg
m.shader = shader("Filters:Blur")
m.shader.conPixel = vec2(1/size,1/size)
m.shader.conWeight = 1/9
m:setColors(255,255,255,255)
m:draw()
setContext()