1
\$\begingroup\$

I'd like to replicate the effect used in Teleglitch:

screenshot 1 screenshot 2

In this scene, an object is rendered more than once at different position with different color.

This game uses this shader effect to create impact. Whenever an object with high velocity moves or hits, this distortion is rendered to give more weight to the moment.

If I had complete control over rendering cycle, I would have re-drew all the in-game objects with different color and position.

However, in Unity, rendering is done via Renderer and I am not sure how to apply this effect to all objects in the game (except the world, so I cannot do post processing).

How can I do this?

\$\endgroup\$

1 Answer 1

3
\$\begingroup\$

This effect is called chromatic aberration, it is achieved by offsetting the different color channels.

In the examples you have given it seems like all three channels have been offset without any blur or distortion, which is usually used along with chromatic aberration to create the effect of an old tv or lens.

I know that Unity 3d has a shader in the standard assets called Vignetting, which also includes the more advanced effects like chromatic aberration. I'm not sure if you can tweak the offsets, but you should be able to edit the shader.

As for only applying the effect to certain objects, you need to look into renderlayers and cameras. You need to have two cameras at the exact same position.

One camera will render everything but your characters. The other camera will then render the characters on top. You then want to apply the chromatic aberration shader to the second camera.

Keep in mind that the two camera technique might cause some z-depth problems.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .