title: OpenGL HDR values are clamped
body: <p>I'm trying to implement HDR in OpenGL.
  <br><br></p>
  
  <p>Here the way i make the HDR framebuffer:</p>
  
  <pre><code>glGenFramebuffers(1, &amp;framebuffer);
  glBindFramebuffer(GL_FRAMEBUFFER, framebuffer);
  
  glGenTextures(1, &amp;fboTex);
  glBindTexture(GL_TEXTURE_2D, fboTex);
  glTexImage2D( GL_TEXTURE_2D, 0,GL_RGBA16F,screen-&gt;w, screen-&gt;h,0,GL_RGBA,GL_FLOAT,NULL);
  
  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
  glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, fboTex, 0);
  
  glGenRenderbuffers(1, &amp;depthBuffer);
  glBindRenderbuffer(GL_RENDERBUFFER, depthBuffer);
  glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8, screen-&gt;w, screen-&gt;h);
  glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT, GL_RENDERBUFFER, depthBuffer);
  
  
  GLenum DrawBuffers[] = { GL_COLOR_ATTACHMENT0 };
  glDrawBuffers(1, DrawBuffers);
  
  if(glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE)
  {
      std::cout&lt;&lt;"Error loading the Framebuffer"&lt;&lt;std::endl;
      return;
  }
  </code></pre>
  
  <p><br><br>
  First step, i use this pixel shader to render my scene and test the HDR framebuffer:</p>
  
  <pre><code>void main (void)
  {
  
   gl_FragColor = vec4(1.1,1.1,1.1,0.0);//1.1 just for test
  
  }
  </code></pre>
  
  <p><br><br>
  And i finally render to screen with this pixel shader:</p>
  
  <pre><code>uniform sampler2D tex;
  
  void main(void) 
  {
  
   float color = texture2D(tex, gl_TexCoord[0].st).x;
  
   if(color&lt;1.1)gl_FragColor = vec4(1.0,0.0,0.0,0.0); //bad
  
   else gl_FragColor = vec4(0.0,1.0,0.0,0.0);//yes what we want
  
  }
  </code></pre>
  
  <p><br><br>
  According to my second shader, i am supposed to obtain a green fullscreen if HDR works. But it seems my values are clamped during the first step, and i obtain a red screen ( if(color&lt;1.1)gl_FragColor = vec4(1.0,0.0,0.0,0.0); )</p>