As a result of some changes I’m doing in the rendering pipeline, achieving multipass rendering is a lot easier (and stable). Multi-pass rendering support is important in order to implement some high-level effects, like real-time shadows.
I wrote a simple example project (called PolygonOffset) introducing multi-pass rendering. The example starts by rendering a scene in the usual way, using a per-pixel lighting shader to produce the following image:
Then, a wireframe version of the same scene is drawn by disabling all lighting and colors:
The final result is obtained by composing both images. The result is shown in the next screenshot:
The PolygonOffset example (which can be found in the examples directory) is part of a series of simple projects used to introduce Crimild to newcomers. I’m still a couple of weeks away of finishing the first batch of articles (which will cover from things like building Crimild from sources to basic rendering effects), but the source code is already available in the SVN repository for those of you who are brave enough to take a look at it.