 	vec4 shiftx = vec4(0.0);
 	vec4 shifty = vec4(0.0);
 
-	for (int i = 0; i < uCrevasPointsN/4+1; i++) {
+	for (int i = 0; i < CREVAS_POINTS_MAXN/4; i++) {
 		/*
 		There are a point A and a line segment PQ.
 		Here, calculating `weight` by following:

	float directionSign = sign(aCrevasPos);
	int crevasPos4 = crevasPos / 4;
	vec4 mask = vec4(0.0);
	mask[crevasPos - crevasPos4*4] = 1.0;
#endif

	vec4 apux, apuy;


vec3 calculateColor(vec2 shift) {
	vec3 color;
	for (int i = 0; i < PARTICLES_MAXN; i++) {
		vec2 p = uParticleCoords[i];
		vec4 pcol = uParticleColors[i];
		float d2 = dot(aCoord - p, aCoord - p);
