Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - dbiton

Pages: [1]
1
Graphics / Re: Blend with previous frame using coefficent
« on: May 30, 2020, 08:04:41 pm »
I think that a shader is going to be the most effective solution for this problem. Try not to worry about experience, the SFML shaders are incredibly easy to use.

You were right, it wasn't hard at all. thanks for the help! :)

2
Graphics / Blend with previous frame using coefficent
« 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.

Pages: [1]