This demo implements one of the most common cel-shading algorithm using the OpenGL Shading Language. Do simple lighting, then look up in a grayscale texture with a few colors. It also draws the outline of the object as well as internal edges. The idea is similar to shadow volume extrusion on the GPU. You extract all edges on the model and store the face normals from the both triangles the edge connects. When one is front-facing and the other backfacing, it’s a silhuette edge.
Feb 25, 2005 | Category: Developers •