       'uniform vec2 u_resolution;'
       'uniform vec2 u_mouse;'
       'uniform float u_time;'
-    ].join('\n')
-
-  _fragmentShader: ->
-    return [
-      @_defaultUniforms()
-
-      'float map(float value, float inMin, float inMax, float outMin, float outMax) {'
-        'return outMin + (outMax - outMin) * (value - inMin) / (inMax - inMin);'
-      '}'
-
-      'void main() {'
-        'vec2 uv = gl_FragCoord.xy/iResolution.xy;'
-        'float aspect = iResolution.x / iResolution.y;'
-        'vec3 color = vec3(uv.x,uv.y,0.0);'
-        'uv.x *= aspect;'
-        'vec2 mouse = vec2(iMouse.xy);'
-        'mouse.x *= aspect;'
-        'float radius = map(sin(iGlobalTime), -1.0, 1.0, 0.25, 0.3);'
-        'if(distance(uv.xy, mouse) < radius){'
-          'color.x = 1.0 - color.x;'
-          'color.y = 1.0 - color.y;'
-        '}'
-        'gl_FragColor=vec4(color,1.0);'
-      '}'
     ].join('\n')
 
   attached: ->

    return unless @uniforms[textureId]?

    @uniforms[textureId].value.dispose()

    @uniforms[textureId].value.needsUpdate = true

    @mesh2.material.needsUpdate = true

    delete @uniforms[textureId]

    @renderShader(@fragShader, true)

    # FIXME: this is only fired for resizing the whole window, not just the panel
    window.addEventListener('resize', @_onResize, false)

  swapMesh: () ->
    material = new THREE.ShaderMaterial({
      uniforms: @uniforms,
      vertexShader: @_vertexShader()
      fragmentShader: @fragShader,
    });

    tmpMesh = new THREE.Mesh(@geometry, material)

    @scene.add(tmpMesh)

    setTimeout =>
      diagnostics = tmpMesh.material.program?.diagnostics
      if (diagnostics? and !diagnostics.runnable)
        msg = diagnostics.fragmentShader.log
        @showError(msg, parseLineNumberFromErrorMsg(msg))
        tmpMesh.material.dispose()
        @scene.remove(tmpMesh)
      else
        @hideError()
        @mesh?.material.dispose()
        @scene.remove(@mesh)
        @mesh = tmpMesh
    , 100

  _getActiveTab: () ->
