title: GLSL preprocessor
body: <p>I'm trying to figure out why the following GLSL code doesn't work:</p>
  
  <pre><code>#ifndef VertexPositionType
  #define VertexPositionType vec3
  #endif
  
  in StandardVertexShaderInputs {
      VertexPositionType ds_VertexPosition;
  };
  
  vec4 ProjectVertexPosition(in vec4 v);
  
  vec4 ProjectVertexPosition(in vec3 v);
  
  void main() {
      gl_Position = ProjectVertexPosition(ds_VertexPosition);
  }
  </code></pre>
  
  <p>The shader refuse to compile. The info log state:</p>
  
  <blockquote>
    <p>error C1008: undefined variable "ProjectVertexPosition"</p>
  </blockquote>
  
  <p>Even if it doesn't warn about the preprocessor, I got that the preprocessor symbol <em>VertexPositionType</em> is not replaced. If I remove the preprocessor definitions, everything is fine.</p>
  
  <p>Now, the specification says:</p>
  
  <blockquote>
    <p><em>#define</em> and <em>#undef</em> functionality are defined as is standard for C++ preprocessors for macro definitions both with and without macro
    parameters.</p>
  </blockquote>
  
  <p>Perhaps the following line is not a valid preprocessor line?</p>
  
  <pre><code>#define VertexPositionType vec3
  </code></pre>