Entry 67 with wind shader

Since our air tower is the boringest one and has no visible wind indication, I’ve been working on a cool shader effect:

This is basically a wavy distortion (heat wave) with a sin/cos applied to the source coordinated. This means I sample the pixels which are [-1..1] * size away from the actual location. Applying a time-based offset to sin/cos, shifts the wave and eventually loops back (i.e. goes a full wave). This looks pretty cool when animated and obviously hard to describe.

So for air tower, firstly we need a “wind” mask — a simple texture that paints in the pixels that need to be distorted in this way, plus some transparency and blurred edges for smooth transition. The mask is just three black button shadows of varying sizes/transparency.

Now applying the texture to the shader:

It’s pretty subtle on a screenshot, but quite visible when animated.

Other towers are also slowly getting upgrades/polish (so to speak). For example, the fire tower got it’s head/stream/effects tweaked. I mean it’s gotta be somewhat better, right:

This entry was posted in Uproot DevDiary.

Leave a Reply

Your email address will not be published. Required fields are marked *