2
« on: May 29, 2020, 11:46:30 pm »
Is there a way to draw to a RenderTexture and apply a blend using a coefficient?
i.e:
out.rgb = new.rgb * c + old.rgb * (1-c)
I have looked into BlendMode, but it seems like only predefined multipliers are defined (I might be missing something).
I know this can be solved by looping over every pixel in the texture and doing it manually, but this is obviously more suited for the GPU.
I can probably use a shader, but I'm very inexperienced with them so I figured I would ask you guys before delving into that.
If it's relevant, I'm trying to achieve an effect where the previous frames linger on and slowly decay away.
Thanks in advance!
Edit: I've also tried to clear the texture with a color whose alpha is not 255 to "partially clear" it, but it didn't work.