Google Summer of Code 2010
Crystal Space

In early May I began work on a Google Summer of Code 2010 project for the open source 3D engine Crystal Space. The goal of the project (outlined more formally here) is to bring deferred shading to the Crystal Space engine.

Deferred shading is a rasterization based rendering method that separates the rendering of geometry from the process of lighting that geometry. In the traditional approach to rasterization (commonly referred to as forward shading) the rendering and lighting of geometry are done in tandem. As a result, using forward shading tends to limit the number of light sources that can affect a single object. However, with deferred shading the cost of adding a light to a scene is independent of the number of objects in that scene. This allows for a significant increase in the number of lights that can be on-screen.

To facilitate the use deferred shading with Crystal Space I have created the deferred shading render manager (rm_deferred for short). Since the usage of rm_deferred is identical to all other render managers, one can easily switch to using deferred shading in any Crystal Space application by supplying the engine with an instance of the deferred render manager (or specifying it as a configuration option). Bellow is a side-by-side comparison of the deferred and the unshadowed render managers being used in the deferred shading demo application.

rm_unshadowed rm_deferred
rm_unshadowed rm_deferred

At the early stage in development the deferred render manager only supports point lights with diffuse Phong shading. I am currently working on adding support for spot lights, directional, light attenuation, and specular highlights.