A multipass rendering example

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:

First Pass: Render the scene

Then, a wireframe version of the same scene is drawn by disabling all lighting and colors:

Second Pass: Rendering a wireframe view

The final result is obtained by composing both images. The result is shown in the next screenshot:

The Result

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.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s