title: GLSL colormap/lookup table
body: <p>I'm quite new to GLSL and I am trying to apply a colormap in a fragment shader, i.e., I have some float value normalized from [0, ...., 1] and I want to convert it into an RGBA value given by a predefined map/lookup table/colormap.</p>
  
  <p>I am doing this by passing a <code>GL_LUMINANCE32F_ARB</code> texture, which is a single float per pixel matrix with my values and size 'width*height' . Also, I am passing a GL_RGBA32F_ARB matrix (4 floats per pixel) with the rgb values mapped from 0 to 1. </p>
  
  <p>This is how I am trying to access my colormap in the fragment shader:</p>
  
  <pre><code>uniform sampler1D cmap;
  ...
  vec4  cmapColor = texture1D(cmap, lum);
  gl_FragColor = cmapColor;
  </code></pre>
  
  <p>where 'lum' is a float in the range (0, 1). However, this is failing. Am I fetching the data correctly? Is this how I get a vec4 of floats?</p>