0.0) cont+=1.0; src += value; //advance the current position pos.xyz += Step; //break if the position is greater than <1, 1, 1> if(pos.x > 1.0 || pos.y > 1.0 || pos.z > 1.0) break; } src.rgb /= Steps; //src.rgba /= cont; src.a = 1.0; gl_FragColor = src; } ]]>