nV News Forums

 
 

nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   NVIDIA Linux (http://www.nvnews.net/vbulletin/forumdisplay.php?f=14)
-   -   Help! : no polygon antialiasing (http://www.nvnews.net/vbulletin/showthread.php?t=12973)

phil d 06-06-03 05:41 PM

Help! : no polygon antialiasing
 
1 Attachment(s)
Hi, can anyone help me out here?

Ive just installed a geforce4 MX440 8xAGP with latest (4363) drivers on my redhat 7.2 system. But, when using openGL...

glEnable(GL_POLYGON_SMOOTH); totally fails to enable polygon antialiasing.

However, glEnable(GL_LINE_SMOOTH); works perfectly well, so there is no problem with antialiasing per se.

If anyone has any ideas how to fix this, I'd be extremely grateful!

Cheers,

Phil

ps XFree86 log attached.

bwkaz 06-06-03 09:25 PM

export __GL_FSAA_MODE=X
./yourprogramname


Replace X with a number. The possible values for this variable, plus the effect of each value on different cards, is all listed in the README.

This does sound kind of broken, but it may be that without that variable set, the GL libraries simply won't antialias polygons. Maybe. Though the variable controls full-screen AA, not just plain AA, so maybe not.

ssross 06-07-03 12:03 PM

I wrote a simple test and it seems to work on my setup (1.0-4363, RH8.0, Ti 4600)

Things to remember when using GL_POLYGON_SMOOTH:

- disable depth buffer
- initialize alpha channel in the frame buffer
- enable blend mode
- draw polygons front to back.

enjoy
scott

ssross 06-07-03 12:05 PM

1 Attachment(s)
Lost the attachment somehow :-)

phil d 06-09-03 11:14 AM

thanks for your help!

i tried the test code, but still no polygon antialiasing.

one possibility is that since the mx440 is a budget card, some desirable features like polygon antialiasing are disabled....

id be interested to know if anyone with an 'mx' card can get GL_POLYGON_SMOOTH to work.

Cheers,

Phil

shassard 06-09-03 12:35 PM

Polygon anti-aliasing is only available on the Quadro line of cards.

I've played around with poly-AA and find that the lines just look really blurry. I tend to prefer nice FSAA over just poly-AA anyday ..

phil d 06-10-03 11:53 AM

hi,

is it known for sure that Quadro cards are the only current nvidia cards that support GL_POLYGON_SMOOTH?

Scott who posted above reported that it worked on his Ti card, so...

Can anyone verify that GL_POLYGON_SMOOTH works for sure with Ti cards, being certain that FSAA is definitely turned off?

You see, I need a dual VGA card that supports GL_POLYGON_SMOOTH...and Quadro cards are pricey.

Cheers

Phil

by the way, GL_POLYGON_SMOOTH is supported on my ancient bargain-basement ATI rage128 card, so I'm pretty unimpressed by nvidia not supporting it in products that are much higher spec than this in all other regards. Im guessing nvidia disabled it as a marketing strategy.

bwkaz 06-10-03 05:49 PM

1 Attachment(s)
FSAA is off:

Quote:

$ echo $__GL_FSAA_MODE

$
When I run the provided test program, I get the output that I've saved to a screenshot and attached. It's a PNG format file (JPEG is lossy, and AFAIK PNG isn't, and losing any image data here might be significant).

Polygon AA seems to be on. I'm running on a GF4 Ti4200.

I'm also not using dual display, though...

phil d 06-11-03 08:08 AM

1 Attachment(s)
thanks for trying that out...

looking at the picture you attached, the antialiasing is surprisingly crude. in the region of that picture that i have attached its clear that pixel intensity calculations are not determined exactly by the proportion of each pixel that is covered by the yellow shape. if it were, we would see a lot more than just 3 colours being used and the edge would not appear jagged at all on a well calibrated monitor.

Do other nvidia card owners get similarly bad antialiasing?

I have tried various ATI cards and found they all implement precise antialiasing - even the cheap cards.

Thanks a lot

Phil

kow 06-11-03 10:48 AM

I've noticed the same effect. In the past (always using Nvidia cards) I kept trying GL_POLYGON_SMOOTH and I thought I was implementing it wrong because the AA looked so crappy. I finally gave up and just went with the export variable for FSAA in hardware.

I always assumed that the openGL would be strictly software AA and not take advantage of whatever AA algorithms have been builtin to the hardware.

Can anyone discredit or support my assumption?

bwkaz 06-11-03 08:13 PM

Quote:

Originally posted by phil d
looking at the picture you attached, the antialiasing is surprisingly crude.
Yeah, no kidding. The left edge of the front triangle is what you're talking about, right? It does look fairly crappy.

Wish I knew why...

<looking back through the thread>

kow -- I don't have a clue whether the hardware of software should be implementing polygon AA, so I can neither confirm nor deny your suspicions. Just in case you're wondering. ;)

<looking back further>

Draw them front to back, huh? That's odd -- I'd think that if the AA happened when the polygons got drawn, then the driver (or the hardware) would need to know what color was behind the polygon in question, not the colors in front of it. Hmm... of course, I don't pretend to understand a whole ton of OpenGL (about enough to draw lines in 3D ;)), so yeah.

ssross 06-12-03 02:54 AM

FYI,
I found a GF2MX card and it does not seem to support polygon smoothing.

bwkaz - front to back does seem strange. It works because of the alpha term in the GL_SRC_ALPHA_SATURATE blend function.

(f, f, f, 1); where f = min(As, 1-Ad)

This mode uses the alpha channel to accumulate the coverage value for each pixel. The other functions work in simple cases but fail where 2 or more smoothed edges overlap.

As for the poor visual performance of the test program, it might be bad because of some default value that needs tweeked. For example I did not set the smooth hint to GL_NICEST -- though setting it does not help.

enjoy
scott


All times are GMT -5. The time now is 09:52 AM.

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