http://en.wikipedia.org/wiki/Z-buffering http://www.codermind.com/articles/Depth-buffer-tutorial.html