nameGIF

About Me

Projects

GEOmancy

Tanx!

Shaders

CellShader

OceanWater

My E-Mail

CellShader

Cell shader is an effect file that i originally wrote for the Tanx project. Since starting computer graphics, I have always had a kinda side interest in non-photorealistic rendering techniques. Cell shading is perhaps one of the more famous of these techniques, giving scene objects a cartoony look to them.

The current technique is simple yet effective, and works by interpolating the objects surface normal across it on a per pixel basis. We then test this normal against the pixel's "To Light" vector, and choose a colour shade depending on this angle. The same approach is used for the black outline, except we test against the "To Viewer" vector instead of the light.

My new aim for my cell shader is to add a post-process technique to the scene and try and add some more "artistry" to the images produced. Post-process techniques work by rendering the frame and depth buffers to a texture, then applying imaging algorithms to them to create interesting results. One idea i have will be to use post-processing to add a "sketchy" style outline to the objects, making them look more hand-drawn then they currently are now.

CellShader (.FX File)

CellShader (RenderMonkey Package File - Includes Tank Model and Sky Texture)

Tank Cell Shade Example

Tank Example, with Reflection

Teapot Shader Example

Teapot Example. No Reflection