So a while ago, while I was making a christmas themed version of a level at work, I was playing the latest SSX after hours.
The christmas level
There’s a game mode in SSX where you have to stay out of the shadow or you freeze to death, they visualise this by putting more and more frost on the screen.
I quite liked this effect, and thought it would be nice to include this in the christmas level at work.
Now in essence it’s just an image overlay, but the special thing about it is that when it fades in or out, it doesn’t just get less or more transparent, but the frost shrinks or grows.
I figured they must be using a blend map or something alike to achieve this,
which is how I then made it.
Here’s what it looks like:
After making this, I thought it would be even better if the ice also distorts the view.
Since the frost effect was already a post effect, this wasn’t that difficult to implement.
What I did was create a normalmap from the frost texture.
This is used to determine the direction of the distortion, and the amount of distortion is relative to the opacity of the frost, together these define the sampling offset.
(It’s a screen space image distortion, so the distortion works by just sampling the source image with the offset.)
So this is what I got:
I’ve made this post effect available for free on the Unity Asset Store:
It requires a Unity Pro license in order to work though.