I drew an object with the following line in fragment shader (taken from OpenGL red book). It can show the edges of the object.
color = vertex.color* (0.1 + abs(vertex.normal.z)) + vec4(0.8, 0.9, 0.7, 1.0) * pow(abs(vertex.normal.z), 40.0);
But if I only use the following, no edges are shown:
color = vertex.color;
Could any one tell me how the differences are made with normals in the first equation.
Thanks in advance