Diffusion of reactive gas to substrate