you have to handle the fog in the vertex shader and output the fog value of each vertex to oFog. here is an example -> http://www.conitecserver.com/ubbthreads/showflat.php?Cat=&Number=298311&page=0&view=collapsed&sb=5&o=&fpart=1&vc=1