Non-Photorealistic Rendering

by Michael Horsch
www.BonzaiSoftware.com

Required Extensions:
GL_ARB_shading_language_100
GL_EXT_framebuffer_object

Controls:
W/A/S/D -> Move Front/Left/Back/Right
1 -> Cartoon Shading
2 -> Pencil Shading
3 -> Ink Shading
9/0 -> Stereo-Mode on/off
Q/E -> Increase/Decrease eye distance
F1 -> Switch Fullscreen/Windowed
F2 -> Hold for free mouse
Edit config.cfg to change the screen resolution

Description:
This demo shows non-photorealistic rendering of 3D-scenes using GLSL shaders. There are three kinds of non-photorealistic rendering in this demo: Cartoon Shading, Pencil Shading and Ink Shading.
The cartoon shading mode uses cel shading to give the scene the look of a cartoon. In all three modes, edges are drawn as a post-processing effect using a laplace edge detection shader. To simulate the shaking hand of an artist, the edges and colors are distorted with a perlin noise texture.
The shadows are generated using shadow mapping. Although this algorithm can lead to ugly artifacts, they weren't avoided completely since they blend well with the style of a painting. In the pencil and ink shading modes, the shadows are combined with a hatch texture.
The demo also features bone animation and some simple AI.
As an extra, the demo supports left/right stereo-projections.

Please send your feedback, questions
or bugs to:
feedback@bonzaisoftware.com
or visit the forum at:
http://forum.bonzaisoftware.com/