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
Sketch.zip (436 KB)
Required: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.