CNA Samples

Distortion

Ported from Microsoft's XNA 4.0 Distortion sample.

Source for this sample on GitHub ↗

A translucent figure warping a sunset landscape, with control hints at the top left. Play ▸

Opens in a new tab. Use A to change the distorter, B to inspect its map, and X to toggle blur.

About this sample

A scene is rendered to a texture, while a model generates a two-dimensional map of how to displace its pixels. A final pass applies that map to the scene. Switch between a Pull-In invisibility cloak, animated Heat-Haze and Displacement-Mapped privacy glass; the optional Gaussian blur softens the distorted region.

Controls

ActionKeyboardGamepad
Next distorterA or SpaceA
Show distortion mapB or TabB
Toggle blurX or Left CtrlX
Rotate cameraLeft / Right arrowsLeft stick
ExitEscapeBack