Tonights coding efforts have born much fruit, I managed to finally generate a decent texture to use for base of the shockwave effect and roughly impliment the effect in game.
The in game result is as good as I’d hope, it still needs a thumping sound effect to give it real punch but I think I’m on to a winner.
The first trick to the effect is trying to get your head around the base texture (to the right), I’ve used a the same technique they use for bump and nornal mapping, where the texture map doesn’t hold colour information it stores offsets for the sampling co-ordinates of the background texture.
Red from 0 to 255 stores the X axis offset and Green the Y, the baby poo tan/green in the middle and the outside on the texture is Colour R128 G128 B0 A255 right in the middle, in other words no offset.
First up I tried using photoshop to generate the texture with overlapping gradients, but I couldn’t get the results I was after so I ended up using XNA to generate the texture on screen and saved it out with the handy Save() method of Texture2D.
Here’s the shader I use to apply the offset texture to the back ground texture: