So basically I want to render each side of the cube map to the screen to check if the values look reasonable.

What is the easiest way to do this? It seems I cannot just select one side of the cube map texture and then render it with GL_TEXTURE_2D?

You could (they're just 0..1 values afterall), but the result mapped directly to intensity wouldn't be that useful since depth values rendered using a perspective projection tend to cluster up close to 1.0 fairly quickly. You want to map that non-linear 0..1 back to linear depth values -NEAR..-FAR and "then" map that linearly to 0..1.

To get to EYE-SPACE Z values:

Code :

eye.z = near * far / ((depth * (far - near)) - far);

where depth is the non-linear 0..1 depth value in the depth buffer. This gives you -n..-f. Now to map to 0..1, negate, subtract near, and divide by (far-near).