Cartoon Shader sample Help

You need to call tex2D in the fragment shader, not in the vertex shader.