Skip to content

Screen Distortion and Creating Distortion Maps

If you are more of a visual learner there’s also a video tutorial:

Screen Distortion is an effect that will distort the final frame based on a Distortion Map Texture. Note that this effect is potentially the most performance intensive effect in the asset, specially in the Built-In render pipeline. Also note that in the Built-In Render Pipeline enabling it swaps the material to the AllIn1VfxGrabPass shader, and that the Material Inspector recommends the Transparent preset for it.

A shockwave and a heat haze step by step, with why sprites and particles are not bent: Shockwave and Heat Distortion Effects in Unity URP.

The Red Area with a ball in front of it: as it is, with a Screen Distortion quad sliding over it like a lens, and with Distort only objects behind on, where the ball no longer bleeds into the distortion

The same setup without the effect, with it, and with Distort only objects behind? on. The distortion samples the frame around each pixel, so without that toggle things in front of the effect bleed into it, like the blue ball here. The lens shape comes from the Normal Map of the material.

This Normal map can be created outside of Unity or you can create it inside Unity with the Normal/Distortion Map Creator in the Texture Creators tab of the Asset Window (see Asset Window section for more details). For example we can create a fisheye Distortion Map like this:

The Normal/Distortion Map Creator with a Target Image, Normal Strength, Normal Smoothing, Invert Normal Direction and Create And Save Normal Map