varying vec4 fragment_position;

void main()
{
  float value = gl_FragCoord.z;

  const vec4 multiplier = vec4(1, 256, 256 * 256, 256 * 256 * 256);
  vec4 split = multiplier * value;
  vec4 decomposed = fract(split);

  gl_FragColor = decomposed;
}