float GetGrowingValue(vec4 fnParams, float x)
{
	float y = fnParams.x + fnParams.w*(x - fnParams.z);
	return min(fnParams.y, max(fnParams.x, y));
}

// byte to float
#define vec4b2f(r,g,b,a) vec4(r/255.0, g/255.0, b/255.0, a/255.0)
