"He who knows not, and knows not that he knows not, is a fool...shun him.
He who knows not, and knows that he knows not, is willing...teach him.
He who knows, and knows not that he knows, is asleep...awaken him.
He who knows, and knows that he knows, is wise...follow him."
- Chinese Probverb

Framework 3 (Last updated: February 6, 2017)
Framework 2 (Last updated: October 8, 2006)
Framework (Last updated: October 8, 2006)
Libraries (Last updated: September 16, 2004)
Really old framework (Last updated: September 16, 2004)
Friday, October 17, 2003 | Permalink

Source code
Sketch.zip (436 KB)

Vertex shader 1.1
Pixel shader 2.0
This is a demo that renders the scene to look as if it would have been sketched. This is done by finding edges in the picture. First the scene is rendered to a texture and the normals and the depth are outputted into it. Then a Sobel filter is applied to all components. This will highlight all edges, not only the silhuette against the background, but also internal edges where there's a difference in depth or when the normal changes a lot over a small distance. To get a smoother image, and to give it a fuzzy pencil drawn feeling, the edge value isn't thresholded, but instead I'm outputting the square of the Sobel filter to allow all kinds of shades of gray. Finally a slight blur filter is applied to smooth it out a little.

Should run on Radeon 9500+ and GFFX.