OpenGL - problem with "OPTION ARB_fog_*" in a fragment shader
I have just installed an FX5600 card with the latest driver and my OpenGL
application does not have fog effect any more. It seems to be a problem with
using the "OPTION ARB_fog_linear" in a fragment shader. (The same happens with exp and exp2 fog as well).
The following is the renderer/version strings:
OpenGL renderer string: Quadro FX 5600/PCI/SSE2
OpenGL version string: 2.1.1 NVIDIA 100.14.19
attached is a small program which shows the problem.
(nvidia-bug-report.zip is attached as well).
The program draws a quad, the bottom of the quad is on z=-1.0 and
the top of the quad is at z=1.0, you can see the fog effect from the quad middle to the top (where the eye space z value is positive) but on the bottom half the fog has no effect. Pressing "p" will switch between using the supplied fragment shader and OpenGL fixed function, you can see the difference
in the fog effect when switching between the two. (the quad will be green when using the shader and white when using the fixed function this is normal the difference in the fog effect is not).
It seems like the shader clamp the eye space z value instead its absolute value.