title: OpenGL / GLSL varying not interpolated across GL_QUAD
body: <p>I am using GLSL to render a basic cube (made from <code>GL_QUADS</code> surfaces). I would like to pass the <code>gl_Vertex</code> content from the vertex into the fragment shader. Everything works, if I am using <code>gl_FrontColor</code> (vertex shader) and <code>gl_Color</code> (fragment shader) for this, but it doesn't work, when using a plain <code>varying</code> (see code &amp; image below). It appears the varying is not interpolated across the surface for some reason. Any idea what could cause this in OpenGL ?</p>
  
  <p><code>glShadeModel</code> is set to <code>GL_SMOOTH</code> - I can't think of anything else that could cause this effect right now.</p>
  
  <p><strong>Vertex Shader:</strong></p>
  
  <pre><code>#version 120
  
  varying vec4 frontSideValue;
  
  void main() {
     frontSideValue = gl_Vertex;
     gl_Position = transformPos;
  }
  </code></pre>
  
  <p><strong>Fragment Shader:</strong></p>
  
  <pre><code>#version 120
  
  varying vec4 frontSideValue;
  
  void main() {
     gl_FragColor = frontSideValue;
  }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/RsGcn.png" alt="Left: Unwanted result, Right: Proper interpolation"></p>