As a first approximation you may want to read about Beer–Lambert law, which is mathematical (and experimentally confirmed) way of dealing with such situations.
At the same time once the intensity of the passing light gets below some threshold it no longer matters, at some level "light" stops to be continuous, you can't have half a photon coming through.