 	float LengthAccumulator = 0.0;
 
 	float CurrentDepth = texture2D(uDepthTexture, ((vPosition.xy / vPosition.w) + 1.0) / 2.0).r;
-
-	for(int i = 0; i < 1000; i ++)
-	{
-		// Generate samples
-		vec4 ColorSample = getColorSample(Iterator);
-		float AlphaSample = ColorSample.a * uStepSize * uAlphaIntensity;
-		
-		// Accumulate
-		ColorAccumulator += (1.0 - AlphaAccumulator) * ColorSample * AlphaSample * 3;
-		AlphaAccumulator += AlphaSample;
-		LengthAccumulator += length(DirectionStep);
-		
-		// Advance iterator
-		Iterator += DirectionStep;
-		
+	
+	const int IterationMax = 1000;
+
+	int i;
+	for(i = 0; i < IterationMax; i ++)
+	{
 		// Calculate depth
 		vec4 ScreenCoords = vec4(Iterator, 1.0);
 		ScreenCoords -= vec4(vec3(0.5), 0.0);
 		ScreenCoords = uProjMatrix * uViewMatrix * uModelMatrix * ScreenCoords;
-
+		
 		float Depth = ScreenCoords.z / ScreenCoords.w;
 		Depth += 1.0;
 		Depth /= 2.0;

		{
			sample.a = uMinimumAlpha;
		}
		break;

	case 3:
		break;
	}


		}
		break;

	case 2: // Isosurface mode
		float Height = sample.a;

		if (abs(Height - uEmphasisLocation) < uLocalRange / 2.0)
