View Single Post
Old 11-19-07, 08:25 AM   #1
gzadickario
Registered User
 
Join Date: Nov 2007
Posts: 1
Default OpenGL - problem with "OPTION ARB_fog_*" in a fragment shader

Hi,

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.
Attached Files
File Type: gz fog.tar.gz (5.6 KB, 83 views)
File Type: zip nvidia-bug-report.zip (27.0 KB, 70 views)
gzadickario is offline   Reply With Quote