This is a fairly standard atmospheric dispersion application.
This is usually discussed under general volumetric lighting, which includes the transmission of light through various media (e.g., smoke, air, water). In a modern graphical shell based on shaders, this can be achieved in real time using beam marching or if there is only one evenly participating medium (as in this case, the fog is applied only to air), simplified to integration at a certain distance.
Usually you pass the marker through the participating media to determine the light transmission properties, but this application is simplified to take an environment that has clearly defined distribution characteristics, and it is here that the coefficients that you confuse come from, The fog density exponentially changes with distance, and this that controls b also changes also with height ( not shown in the equation immediately below).
http://www.iquilezles.org/www/articles/fog/for00.png
However, this article is a discussion of the weakly named coefficients a and b . They control scattering and extinction. The author repeatedly refers to the extinction coefficient as an extension, which actually does not make any sense to me - I hope this is simply because English was not the mother tongue of the author. Extinction can be considered as how quickly light is absorbed, and describes the opacity of the medium. If you want a more theoretical foundation for all of this, see the next article .
With this in mind, take another look at the code from your article:
vec3 applyFog( in vec3 rgb,
You can see that c in this code is actually a from the original equation.
More importantly, there is an additional expression:

This additional expression controls density in height. Judging by your shader implementation, you have incorrectly executed the second expression. camFrag.z very likely not a height, but a depth. Also, I don't understand why you multiply it by a coefficient b .