shader: based on http://threejs.org/examples/#webgl_shader2