title: Using UInt8Array data in WebGL shader
body: <p>An HTML FFT audio analyzer outputs its data into a UInt32Array(64) type.</p>
  
  <p>According to three.js documentation, this data type is not supported: <a href="https://github.com/mrdoob/three.js/wiki/Uniforms-types" rel="nofollow">https://github.com/mrdoob/three.js/wiki/Uniforms-types</a></p>
  
  <p>How can get my per frame FFT buffer data into my vertex shader, in a cheap way?</p>
  
  <p>I've not been able to compile the shader beacause of the incompatibility. </p>
  
  <p>Any help, suggestions appreciated.</p>
  
  <pre><code>        attributes = {
              customColor:  { type: "c", value: [] },
              tick:      { type: "f", value: 1.0 }
          };
  
          uniforms = {
              amplitude: { type: "f", value: 5.0 },
              opacity:   { type: "f", value: 0.3 },
              color:     { type: "c", value: new THREE.Color( 0xff0000 ) },
              fftSize:   { type: "i", value: 63 },
              freqData:  { type: "fv1", value: freqByteData }
          };
  
  ...
  </code></pre>
  
  <p>in the render() loop:</p>
  
  <pre><code>        freqByteData = new Uint8Array(analyser.frequencyBinCount);
          analyser.getByteFrequencyData(freqByteData)
  
          uniforms.freqData = freqByteData;
  </code></pre>
  
  <p>and GLSL v-shader:</p>
  
  <pre><code>        uniform float freqData[64]; // not working, primitive type conflict
          uniform int fftSize;
          uniform float amplitude;
  
          attribute vec3 customColor;
          attribute int tick;
  
          varying vec3 vColor;
  
          void main() {
  
              vec3 norm = normalize(position);
  
              vec3 newPosition = position * freqData[tick % fftSize] + amplitude;
  
              vColor = customColor;
  
              gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
  
          }
  </code></pre>