//returns color and opacity of clouds
vec4 drawClouds(vec2 pos) {
	float time = frameTimeCounter * invNoiseRes;
	pos.x += time; //apply wind
	pos *= invNoiseRes * 4.0;
	time *= 0.015625;

	float noise = 0.0;
	noise += (texture2D(noisetex, (pos + time * goldenOffsets[0])        ).r - 0.5) * 2.0;
	noise += (texture2D(noisetex, (pos + time * goldenOffsets[1]) * 2.0  ).r - 0.5);
	noise += (texture2D(noisetex, (pos + time * goldenOffsets[2]) * 4.0  ).r - 0.5) * 0.5;
	noise += (texture2D(noisetex, (pos + time * goldenOffsets[3]) * 8.0  ).r - 0.5) * 0.25;
	noise += (texture2D(noisetex, (pos + time * goldenOffsets[4]) * 16.0 ).r - 0.5) * 0.125;
	noise += (texture2D(noisetex, (pos + time * goldenOffsets[5]) * 32.0 ).r - 0.5) * 0.0625;
	noise += (texture2D(noisetex, (pos + time * goldenOffsets[6]) * 64.0 ).r - 0.5) * 0.03125;
	noise += (texture2D(noisetex, (pos + time * goldenOffsets[7]) * 128.0).r - 0.5) * 0.015625;

	if (noise > 0.0) { //there are clouds here
		return vec4(mix(vec3(1.0, 1.0, 1.0), vec3(0.48, 0.5, 0.55), fogify(noise, 0.25)), 1.0 - fogify(noise, 0.0625));
	}
	return vec4(0.0);
}