4
\$\begingroup\$

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

\$\endgroup\$
7
\$\begingroup\$

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.

\$\endgroup\$
  • \$\begingroup\$ That's a cool link! \$\endgroup\$ – Jonathan Connell Jul 1 '11 at 12:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.