OSG.JS
This sample demonstrate how to implement fog with osgjs. It's very simple to be useful for beginners
There is a very good article about fog equation on Ozone3D