Experiment with a vertex shader.
Vertex Shader
attribute vec4 position;
attribute vec3 normal;
attribute vec2 uv;
uniform mat4 agk_WorldViewProj;
uniform mat3 agk_WorldNormal;
uniform vec3 agk_DLightDir;
varying vec2 vTexCoord;
void main(void)
{
gl_Position = agk_WorldViewProj * position;
float toon = max(0.0, dot(agk_DLightDir, agk_WorldNormal * normal));
vTexCoord.xy = toon;
}
Pixel Shader
#ifdef GL_FRAGMENT_PRECISION_HIGH
precision highp float;
#else
precision mediump float;
#endif
uniform sampler2D texture0;
uniform vec4 agk_ObjColor;
varying vec2 vTexCoord;
void main(void)
{
gl_FragColor = texture2D(texture0, vTexCoord) * agk_ObjColor;
}
https://www.dropbox.com/s/upt401o992js9jv/cartoonshader.rar
...