title: How to write pass-through vertex and fragment shaders for a framebuffer with attached texture?
body: <p>I'm attempting to use shaders to modify a texture that is bound to a framebuffer, but I'm confused as to how the shaders get the "original" input values.</p>
  
  <p>I'm doing the following:</p>
  
  <pre><code>GLuint textureId = 0;
  glGenTextures(1, &amp;textureId);
  glBindTexture(GL_TEXTURE_2D, textureId);
  glTexImage2D(GL_TEXTURE_2D, ...);
  
  GLuint framebufferId = 0;
  glGenFramebuffers(1, &amp;framebufferId);
  glBindFramebuffer(GL_FRAMEBUFFER, frameBufferId);
  glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, textureId, 0);
  glBindTexture(GL_TEXTURE_2D, 0);
  
  GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);
  if (status != GL_FRAMEBUFFER_COMPLETE) { ... }
  
  glUseProgram(programId);
  const GLenum buffer = GL_COLOR_ATTACHMENT0;
  glDrawBuffers(1, &amp;buffer);
  </code></pre>
  
  <p>What would empty vertex and fragment shaders look like? As I'm not drawing primatives, how do I set <code>gl_Position</code> in the vertex shader? What about passing through the input colour as the output colour of the fragment shader?</p>
  
  <p>Empty vertex shader:  </p>
  
  <pre><code>#version 330
  
  void main()
  {
      gl_Position = ??;
  }
  </code></pre>
  
  <p>Empty fragment shader:  </p>
  
  <pre><code>#version 330
  
  layout(location = 0) out vec4 out_colour;
  
  void main()
  {
      out_colour = ???;
  }
  </code></pre>