You can accomplish this with screen-space derivatives. Instead of drawing a band of color over a range of contours, you draw a band of color over a range of pixels near the contour value. Here's an example in GLSL, but it should port easily.
This vertex shader simply passes along the position in a varying variable.
varying vec3 k;void main(){ k = gl_Vertex.xyz; gl_Position = ftransform();}
For reference, here's a GLSL fragment shader that does something similar to your approach. It uses smoothstep to get anti-aliased contour lines.
varying vec3 k;void main(){ vec3 f = fract (k * 100.0); vec3 df = fwidth(k * 100.0); vec3 g = smoothstep(0.05, 0.10, f); float c = g.x * g.y * g.z; gl_FragColor = vec4(c, c, c, 1.0);}
Here's what this looks like applied to the head of the famous dragon. It has the same results that you see: lines that are too narrow in some places and too wide in others.

Now here's a fragment shader that uses screen-space derivatives to accomplish the same task. It uses smoothstep to blend between distances of 1 and 2 pixels from the desired contour value.
varying vec3 k;void main(){ vec3 f = fract (k * 100.0); vec3 df = fwidth(k * 100.0); vec3 g = smoothstep(df * 1.0, df * 2.0, f); float c = g.x * g.y * g.z; gl_FragColor = vec4(c, c, c, 1.0);}
The result is a set of contour lines of consistent width everywhere.