title: Using HTML5 WebGL Shaders for Computation
body: <p>It seems to me like one could theoretically use WebGL for computation--such as computing primes or π or something along those lines.  However, from what little I've seen, the shader itself isn't written in Javascript, so I have a few questions:</p>
  
  <ol>
  <li><strike>What language <em>are</em> the shaders written in?</strike></li>
  <li>Would it even be worthwhile to attempt to do such a thing, taking into account how shaders work?</li>
  <li>How does one pass variables back and forth during runtime?  Or if not possible, how does one pass information back after the shader finishes executing?</li>
  <li>Since it isn't Javascript, how would one handle very large integers (BigInteger in Java or a ported version in Javascript)?</li>
  <li>I would assume this automatically compiles the script so that it runs across all the cores in the graphics card, can I get a confirmation?</li>
  </ol>
  
  <p>If relevant, in this specific case, I'm trying to factor fairly large numbers as part of a [very] extended compsci project.</p>
  
  <p><strong>EDIT:</strong></p>
  
  <ol>
  <li>WebGL shaders are written in GLSL.</li>
  </ol>