uniform mat4 uViewMatrix;
uniform mat4 uProjectionMatrix;

attribute vec3 aPosition;

varying float vDepth;

void main(void) {
  vec4 worldPosition = vec4(aPosition, 1.0);
  vec4 viewPosition = uViewMatrix * worldPosition;
  gl_Position = uProjectionMatrix * viewPosition;

  // Orthogonal depth is simply -z in the camera space.
  vDepth = -viewPosition.z;
}
