The only problem with this shader is that it passes through the same color fog for each pass... Think about it for a second, if you have the same fog for 3 or 4 passes, each being additive blended, your fog color will be all funky, and not match the actual fog value...becasue it fogs each pass seperately, anbd adds that to last pass..

A good way to handle this problem is to have the fog as normal in the first pass, then in all subsequent passes, change the fog color to black, then becasue it is additive, it will just dim down the passes, instead of fogging them with a color.. this will then give correct fog colors throughout all the passes.

You can set the fog color in the passes (except for the first pass, you shouldnt need to change that) like this:
fogcolor={0.0,0.0,0.0,1.0}; // this will be black..


Sphere Engine--the premier A6 graphics plugin.