When calculating fog along the ray we have two main part- transmittance and scattering.
What happens when we have two different fogs? With different extinction and color? Both extinction and color constant along the ray.
Transmittance seems easy to merge, probably something like this: $$T = e^{(\sigma_a+\sigma_b)d}$$ Where d is ray length.
What about color?
General in-scattering equation looks like this: $$S=\sigma *Fog_{color}\int_0^dT(x,\omega x)dx$$
What will happen with this equation when there are two fogs?
Will it become: $$Fog_{color}=lerp(Fog_a,Fog_b,\sigma_b/(\sigma_a+\sigma_b))$$ $$\sigma_t=\sigma_a+\sigma_b$$ $$S=\sigma_t*Fog_{color}*\int_0^de^{-\sigma_tx}dx$$ Or $$S=\sum_0^n\sigma_i*Fog_i\int_0^dT_i(x,\omega x)dx$$ Where n is fogs count.
Or something else?
