Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 09-14-06, 11:56 PM   #1
kanttu
Registered User
 
Join Date: Sep 2006
Posts: 16
Default *bug report* GL_FOG

I have this issue with linear GL_FOG. Somehow it seems that the depth is not correct. The only "working" values seem to be between 0.0 - 1.0 but the real depth range is more like between 0 and 100.

This case works just fine in my i830 laptop and I have some reference photos attached, as well as a c source code to reproduce this issue. I hope this clears things out.

*Edit* - Just to make clear the images: the red one is how it's supposed to look according to OpenGL specs and how it appears in my i830 laptop, the gray one is how it appears with my nvidia card incorrectly.
Attached Thumbnails
Click image for larger version

Name:	shot_i830.png
Views:	189
Size:	29.5 KB
ID:	20344  Click image for larger version

Name:	shot_nvidia.png
Views:	186
Size:	9.4 KB
ID:	20345  
Attached Files
File Type: log nvidia-bug-report.log (83.1 KB, 105 views)
File Type: txt nvbug.c.txt (1.2 KB, 136 views)
kanttu is offline   Reply With Quote
Old 09-15-06, 12:02 AM   #2
netllama
NVIDIA Corporation
 
Join Date: Dec 2004
Posts: 8,763
Default Re: *bug report* GL_FOG

I'm not really clear on what your test app is supposed to be illustrating. Is one of the images the expected behavior?

Thanks,
Lonni
netllama is offline   Reply With Quote
Old 09-15-06, 12:13 AM   #3
kanttu
Registered User
 
Join Date: Sep 2006
Posts: 16
Default Re: *bug report* GL_FOG

The red one (left) is the expected behavior.
kanttu is offline   Reply With Quote
Old 09-15-06, 02:04 AM   #4
AaronP
NVIDIA Corporation
 
AaronP's Avatar
 
Join Date: Mar 2005
Posts: 2,487
Default Re: *bug report* GL_FOG

@kanttu: According to the docs, the fog distance is supposed to be computed in eye coordinates, i.e., after the GL_MODELVIEW matrix is applied but before the GL_PROJECTION matrix is. Can you confirm that it works if you put the perspective projection in the GL_PROJECTION matrix?
AaronP is offline   Reply With Quote
Old 09-15-06, 03:10 AM   #5
kanttu
Registered User
 
Join Date: Sep 2006
Posts: 16
Default Re: *bug report* GL_FOG

Quote:
Originally Posted by AaronP
@kanttu: According to the docs, the fog distance is supposed to be computed in eye coordinates, i.e., after the GL_MODELVIEW matrix is applied but before the GL_PROJECTION matrix is. Can you confirm that it works if you put the perspective projection in the GL_PROJECTION matrix?
@AaronP: To be honest I don't really get your point here. Of course it should work with perspective projection. That's the main projection mode in whole 3D, paraller mode is just an addtive mode next to that.

One guy with ATI Radeon 9800pro tested my program and sent his screenshot which I'm attaching here. As you see it works like expected.

So now it seem to be Intel 830, Ati Radeon and my OpenGL experience versus Nvidia.
Attached Thumbnails
Click image for larger version

Name:	shot_ati.jpg
Views:	123
Size:	187.0 KB
ID:	20353  
kanttu is offline   Reply With Quote
Old 09-15-06, 06:24 AM   #6
chunkey
#!/?*
 
Join Date: Oct 2004
Posts: 662
Default Re: *bug report* GL_FOG

Take a look at this:
Attached Thumbnails
Click image for larger version

Name:	shot_nvidia.png
Views:	163
Size:	14.9 KB
ID:	20357  
Attached Files
File Type: txt nvbug.c.txt (1.3 KB, 173 views)
chunkey is offline   Reply With Quote
Old 09-15-06, 08:55 AM   #7
kanttu
Registered User
 
Join Date: Sep 2006
Posts: 16
Default Re: *bug report* GL_FOG

Quote:
Originally Posted by chunkey
Take a look at this:
Ok, that's weird I wouldn't have thought that kind of solution...

So is this really a bug or is Radeon and i830 drivers doing something out of the specs?
Life would be so much easier if the same application looked similar in every graphics adapter using OpenGL.

But thanks for the workaround, it really eased my pain.
kanttu is offline   Reply With Quote
Old 09-16-06, 06:12 AM   #8
chunkey
#!/?*
 
Join Date: Oct 2004
Posts: 662
Wink Re: *bug report* GL_FOG

Quote:
Originally Posted by kanttu
Ok, that's weird I wouldn't have thought that kind of solution...

So is this really a bug or is Radeon and i830 drivers doing something out of the specs?
Life would be so much easier if the same application looked similar in every graphics adapter using OpenGL.

But thanks for the workaround, it really eased my pain.
It's not a bug, but not a feature too.
Nvidia has really weird default settings for the projection matrix and that's why it looks so odd.
just as AaronP said.
chunkey is offline   Reply With Quote

Old 09-16-06, 10:45 AM   #9
AaronP
NVIDIA Corporation
 
AaronP's Avatar
 
Join Date: Mar 2005
Posts: 2,487
Default Re: *bug report* GL_FOG

@kanttu: This article describes a similar problem (putting the camera transform in the GL_PROJECTION matrix), but maybe it'll help: http://sjbaker.org/steve/omniv/projection_abuse.html
Sorry about the really bad HTML color scheme.
See also http://opengl.org/resources/faq/tech...g.htm#view0030
AaronP is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 10:38 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.