Decoupled Mie and Rayleigh scattering

Also did some refactoring of shader code.