 		// because of data dependencies
 		for (int i = n; i >= k; --i) {
 			// Watch out for divide-by-zeros
-			// as[i-1] = (u - us[i-1]) / (us[i + n - k] - us[i -1]);
+			//as[i-1] = (u - us[i-1]) / (us[i + n - k] - us[i -1]);
+			//*
 			as[i-1] = us[i + n - k] - us[i-1];
 			if (as[i-1] != 0.0) {
 				as[i-1] = (u - us[i-1]) / as[i-1];
 			}
+			//*/
 			ds[i] = (1.0 - as[i - 1]) * ds[i - 1] + as[i - 1] * ds[i];
 		}
 	}

// USER_PARAMETERS

vec4 function(float s) {
	return vec4(USER_FUNCTION, s, 0.0, 1.0);
}

void main() {

	vec4 knotsValue = texture2D(knotsTexture, vec2(u, 0.0));
	vec4 cpsValue   = texture2D(cpsTexture  , vec2(u, 0.0));
	
	result.x = ds[n].x;
	result.xy /= scale;
	//result.x = ds[n].y;
	//result.x = l;
