Shockwave effect

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
zorg
Party member
Posts: 3441
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Shockwave effect

Post by zorg »

You are right, only one would be sent to it, but you could define an extern in your shader, that will hold a (dest) canvas, and you can use that, and the supplied drawable (source) to draw with a shader implementing a blending mode... though you will probably need two canvases in total to do this, since iirc you shouldn't read from and draw to the same canvas... though that's usually with passing the canvas into love.graphics.draw, not with shader:send... didn't test this yet, to be honest.

As for how much this will tank performance... the biggest issue would probably be sending that canvas through shader:send, but i believe that doing this once per frame probably won't cause too much slowdown... probably.

Anyway, here's a site i googled that have some relevant formulas: http://renderingpipeline.com/2012/06/ph ... modi-glsl/
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
User avatar
xNick1
Party member
Posts: 267
Joined: Wed Jun 15, 2016 8:27 am
Location: Rome, Italy

Re: Shockwave effect

Post by xNick1 »

That looks awesome :D
Post Reply

Who is online

Users browsing this forum: No registered users and 185 guests