This document explains how to convert a depth that is expressed in a `float` into a 24-bit integer:
http://www.sjbaker.org/steve/omniv/love_your_z_buffer.html