Fog

Having a quick play around with Fog today i couldnt seem to get the fog origon to begin anywhere but z = 0; (RGB mode)

so increasing distance along -z fog density is greater
and increasing distance along +z fog density is greater
and at z = 0 fog density = 0

Now this would be cool for me if i had a static scene that is aligned across the Z axis. but if i have dynamic scene that passes through +/- Z axis then a horrid great line of 0 density fog appears at z=0 and with greater and greater density heading out towards -z and + z world coords.

I hadnt bothered with Fog before today as i was under the impression i just set an origon and density, this seems not to be the case. Some help please

Don’t ever call glTranslate for the GL_PROJECTION matrix but always translate the world around you. Then the fog should work as expected.