 // USER_PARAMETERS
 
 vec4 function(float s) {
-	return vec4(USER_FUNCTION, s, 0.0, 1.0);
+	return vec4(USER_FUNCTION, (1.0 - (0.5 * s / 0.5)) * ((1.0 - (0.5 * s / 0.5)) * 1.0 + (0.5 * s / 0.5) * 2.0) + (0.5 * s / 0.5) * ((1.0 - 0.5 * s) * 2.0 + 0.5 * s * 0.0), 0.0, 1.0);
 }
 
 void main() {

		// 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] = 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];
		}
	}

	//*
	// Grab all the control points early on
	for (int i = 0; i <= n; ++i) {
		ds[i] = texture2D(knotsTexture, vec2(float(li - n + i) / float(cpCount + 1) + cpEps, 0));
	}
	//*/
	
	//*
	// Grab all the u's early on
	for (int i = 0; i < 2 * n; ++i) {
		us[i] = texture2D(knotsTexture, vec2(float(li - n + 1 + i) / float(knotCount + 1) + knEps, 0)).r;
	}
	//*/
	
