CNA Samples

Non-Photorealistic

Ported from Microsoft's XNA 4.0 Non-Photorealistic sample.

Source for this sample on GitHub ↗

An orange spacecraft drawn with colored hatching over a pale blue textured background. Play ▸

Opens in a new tab. Press A to cycle through six rendering styles.

About this sample

Toon shading gives the rotating ship sharp bands of light. An edge-detection pass draws outlines from a normal-and-depth render target, while a sketch pass layers a jittered pencil pattern over the scene. Six presets combine these techniques, from a colorful cartoon to monochrome pencil and colored hatching, with an unprocessed view for comparison.

Controls

ActionKeyboardGamepad
Next rendering styleAA
ExitEscapeBack