title: How to console.log in webgl shaders?
body: <p>I'm trying to understand how to simulate console.log in webgl shaders which are written in GLSL. It's easy to get error messages but I can't get how to print custom messages.</p>
  
  <p>Basically I want to print stuff in the browser's console:</p>
  
  <pre><code>&lt;script id="shader-fs1" type="x-shader/x-fragment"&gt;
    void main(void) 
    { 
      //console.log doesn't work here since it's GLSL not javascript
      gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0); 
    } 
  &lt;/script&gt;
  </code></pre>
  
  <p>Any suggestions?</p>