This sample implements the simple brick shader that is described in the Orange book.
You can grab the sources!