Take the 2-minute tour ×

I was thinking about effects in games the other day and I was reminded of the Gasmask effect from Metro 2033. Once you put the gasmask on it blurred a bit in the corners and could ice up and even get cracked.

I assume that something like that is done using a shader. I have been experimenting a bit with game development, so far mostly playing with existing rendering engines and adding physics support etc.

I would like to learn more about this sort of effect. Can someone give me a simple example of a shader that would alter the entire scene like this. Or if not a shader then an idea on how it would be done. Thanks.

Edit : Include screenshot of the metro 2033 gasmask effect. enter image description here enter image description here

share|improve this question
Not everyone here has played Metro. Can you post some screenshot of the effects you are describing? –  AttackingHobo Jul 1 '11 at 2:01
Thanks, I have added screenshots. –  Tim Jul 1 '11 at 5:12
It's easier to see in a video: youtube.com/watch?v=16fXGrvKIJ0#t=0m15s notice the fuzz around the corners of the screen –  BlueRaja - Danny Pflughoeft Jul 1 '11 at 6:53
add comment

1 Answer

It's a combination of full-screen effects. There are a few ways to render full-screen shader effects, the most common is to first render the scene (without effects) to texture. Then that texture and the effect shader is set and a fullscreen quad is rendered.

The blurring in the corners could be done with a refraction effect. A refraction texture controls how much the light should be bent for each texel in the screen buffer. Here is an example of a Unity refraction shader.

This tutorial (rastek) shows how to create glass and ice effects with DirectX 10/ HLSL.

The cracks look like transparent textures to me.

share|improve this answer
That's a cool link! –  Jonathan Connell Jul 1 '11 at 12:46
add comment

Your Answer


