title: smooth 64bit input from vertex to frag shader - "error C7570: 64 bit input should be flat"
body: <p>I've made a small program in OpenGL that draws the <a href="https://en.wikipedia.org/wiki/Mandelbrot_set" rel="nofollow noreferrer">Mandelbrot set</a>, however I am having some trouble using 64bit values in my fragment shader. Everything works as intended when i use the <code>vec2</code> type in my shaders like so and an array of doubles for my vertex array in c++:</p>
  <pre class="lang-c prettyprint-override"><code>#shader vertex
  #version 410 core
  
  layout(location = 0) in vec4 a_position;
  layout(location = 1) in vec3 a_colour;
  layout(location = 2) in vec2 mandelbrot;
  smooth out vec3 frag_colour;
  smooth out vec2 frag_mandelbrot;
  uniform float view_zoom;
  uniform vec2 view_translate;
  void main()
  {
      gl_Position = a_position;
      frag_colour = a_colour;
      frag_mandelbrot = (mandelbrot / view_zoom) + view_translate;
  };
  
  
  #shader fragment
  #version 410 core
  
  layout(location = 0) out vec3 colour;
  in vec3 frag_colour;
  in vec2 frag_mandelbrot;
  
  void main()
  {
      double x = 0;
      double y = 0;
      vec3 start = vec3(0.0f, 0.0f, 0.0f);
      vec3 end = vec3(1.0f, 1.0f, 1.0f);
      int iteration = 0;
      int max_iteration = 250;
      while (x*x + y * y &lt;= 2 * 2 &amp;&amp; iteration &lt; max_iteration) {
          double xtemp = x * x - y * y + frag_mandelbrot[0];
          y = 2 * x*y + frag_mandelbrot[1];
          x = xtemp;
          iteration++;
      }
      float t = float(iteration) / float(max_iteration);
      colour = mix(start,end,t);
  };
  </code></pre>
  <p>However when I tried to use the dvec2 type like this:</p>
  <pre class="lang-c prettyprint-override"><code>#shader vertex
  #version 410 core
  
  layout(location = 0) in vec4 a_position;
  layout(location = 1) in vec3 a_colour;
  layout(location = 2) in dvec2 mandelbrot;
  smooth out vec3 frag_colour;
  smooth out dvec2 frag_mandelbrot;
  uniform double view_zoom;
  uniform dvec2 view_translate;
  void main()
  {
      gl_Position = a_position;
      frag_colour = a_colour;
      frag_mandelbrot = (mandelbrot / view_zoom) + view_translate;
  };
  
  
  #shader fragment
  #version 410 core
  
  layout(location = 0) out vec3 colour;
  in vec3 frag_colour;
  in dvec2 frag_mandelbrot;
  
  void main()
  {
      double x = 0;
      double y = 0;
      vec3 start = vec3(0.0f, 0.0f, 0.0f);
      vec3 end = vec3(1.0f, 1.0f, 1.0f);
      int iteration = 0;
      int max_iteration = 250;
      while (x*x + y * y &lt;= 2 * 2 &amp;&amp; iteration &lt; max_iteration) {
          double xtemp = x * x - y * y + frag_mandelbrot[0];
          y = 2 * x*y + frag_mandelbrot[1];
          x = xtemp;
          iteration++;
      }
      float t = float(iteration) / float(max_iteration);
      colour = mix(start,end,t);
  };
  </code></pre>
  <p>I get the following compilation error in my frag shader :</p>
  <blockquote>
  <p>0(5) : error C7570: 64 bit input 'frag_mandelbrot' should be flat</p>
  </blockquote>
  <p>My question is, why should it be flat? The GLSL documentation states the following:</p>
  <blockquote>
  <p>&quot;Note: Precision qualifiers in GLSL are supported for compatibility with OpenGL ES. They use the same syntax as ES's qualifiers, but they have no functional effects. Do not use them unless you want your shaders to be ES compatible.&quot;</p>
  </blockquote>
  <p>so I take it that these (highp, mediump, ect.) are not to be used for ordinary desktop opengl. Is it not possible for the frag shader to take 64 bit values interpolated from vertex attributes as input? Or have I just made some silly mistake somewhere?</p>