Author: DigiBen
Toon shading is when a model is rendered so that it looks like a cartoon. The basic idea revolves are taking a dot product with each vertex normal and the light direction then use the dot product to determine how shaded the pixel should be. This lesson in GLSL loads an .MD2 model and uses a simple toon shading algorithm to color it.
Functions Used: fopen(), fclose(), fread(), fseek(), strcpy(), vector::push_back(), vector::clear(), new, delete, glEnable(), glLoadIdentity(), gluLookAt(), glLightfv(), glDisable(), glNormal3f(), glTexCoord2f(), glVertex3f(), glCreateShaderObjectARB(), glShaderSourceARB(), glCompileShaderARB(), glCreateProgramObjectARB(), glAttachObjectARB(), glLinkProgramARB(), glUseProgramObjectARB(), glGetUniformLocationARB(), glDetachObjectARB(), glDeleteObjectARB(), glGetString(), wglGetProcAddress()
purchase full version
Access EXE