Swirl Filter

I’ve seen this effect in a few places and I’ve always wondered how it worked. I decided one morning to try to build it on shadertoy, just as a sort of brainteaser for myself. It turned out to be pretty simple – all you have to do is rotate the UV’s proportionally to the radial offset. You use a smoothstep to bring the angle offset to zero at the edge of the desired effect radius. It’s a pretty small shader – check it out here.

I also participated in a 12-hour (that’s not a typo) game jam this weekend and decided I’d throw the spiral into the game. It ended up being an obnoxious but hilarious environmental obstacle that would randomly spawn and toss all of the players around. Here’s a clip of the game:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s