title: Threejs shader implementation
body: <p>Past weeks I have been experimenting with the three.js library &amp; shaders and I’m stuck with implementing a shader on my model. I found this interesting example on pixelshaders.com that I want to implement on a threejs model.</p>
  
  <p><a href="http://pixelshaders.com/examples/noise.html" rel="nofollow">http://pixelshaders.com/examples/noise.html</a></p>
  
  <p>It's the last example at the bottom of the page and I’m trying to implement.</p>
  
  <p>I'm trying to add it to the 3D model that can be found in the link below:</p>
  
  <p><a href="http://martinr.nl/lab/Speeltuin/webgl_shader2.html" rel="nofollow">http://martinr.nl/lab/Speeltuin/webgl_shader2.html</a></p>
  
  <p>The hard thing is when I add the code of the example the 3D model disappears. This makes it really hard to debug and find the error.</p>
  
  <p>This is the shader code that works, but not with the right shader:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>&lt;script id="fragmentShader" type="x-shader/x-fragment"&gt;
      varying vec2 vUv;
  
      uniform float time;
      uniform vec2 resolution;
      precision mediump float;
  
      void main( void ) {
  
          vec2 position = 2.0 + 2.0 * vUv;
  
          float red = abs( sin( position.x / position.y + time / 5.0 ) );
          float green = abs( sin( position.x / position.y + time / 4.0 ) );
          float blue = abs( sin( position.x / position.y + time / 3.0 ) );
          gl_FragColor = vec4( red, green, blue, 1.0 );
      }
  
  &lt;/script&gt;
  
  &lt;script id="vertexShader" type="x-shader/x-vertex"&gt;
  varying vec2 vUv;
  
      void main()
      {
          vUv = uv;
          vec4 mvPosition = modelViewMatrix * vec4( position, 1.0);
          gl_Position = projectionMatrix * mvPosition;
      }
  
  &lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>When I try to implement the shader of the above example the 3D model disappears.</p>
  
  <p>Does anyone know how to implement the shader of the pixelshader.com example onto the model in my example?</p>
  
  <p>Or does anyone have any tips what I could try to make it work?</p>