title: How can I make this spherical gradient in an OpenGL fragment shader?
body: <p>I'm new to OpenGL. I'd like my background to look as if the player is inside the sphere pictured below. White as the player looks up, black as the player looks down, and a gradient along the way.</p>
  <p>I tried enclosing the camera in a diamond shaped prism and assigning white to the top vertex, gray to middles, and black to the bottom. But the seams of the triangles are very apparent, which I don't totally understand why. It seems overkill to make more vertices to better approximate a sphere. I feel like I should be able to do this all in the fragment shader, but don't know enough to implement it. I can pass the camera's y direction [-1,1] as a uniform to the shader.</p>
  <p>How can I implement this?</p>
  <p><img src="https://i.stack.imgur.com/wh4Ri.jpg" alt="Sphere Gradient" /></p>