PDA

View Full Version : Performance issues



LordOfTheUniverse
12-11-2002, 11:05 AM
Hi,
my problem is:
I'm rendering a scene with a skybox;

*when I turn skybox off I have FPS count at 150fps
with all models loaded
(at Duron800, Geforce2MX400, XFree86 4.2.1);

*when I switch skybox off framerate drops to 108fps;

I also try to achive height related fog with 15 layers of antialiased quads. It causes major slowdown (to about 30fps).

I understand that it's releted to large quads (my have edges size at ca. 200 OpenGL 'units'), but how to speed it up.

Replies welcome.

BTW. Take a look at my site: www.loiv.torun.pl/~stinger (http://www.loiv.torun.pl/~stinger)
and tell me what you think.
.

M/\dm/\n
12-11-2002, 09:28 PM
To get better preformace from cube maps (skyboxes) their size shoud be 1x1, but you can disable depthtesting in different parts of your code, so it'll make ilusion that the skybox is at infinite distance.

Relic
12-12-2002, 01:11 AM
Your application is fillrate limited (if it runs faster in a smaller window, that is.)
Alpha blending does need to do read-modify-write operations on the frame buffer which is even worse for fillrate than the skybox.

Try to draw things in a front to back order to get as much depth test failures as possible (less overdraw).
For transparent objects, enable alpha test additionally to blending so that less fragments are generated. Experiment with alpha test thresholds to remove all fragments from the pipeline which wouldn't add to the blending effect. Fully transparent pixels don't do the read-modify-write then.
Or never clear the color and depth buffer, but let the skybox erase your screen, it should touch all pixels.
Or buy a graphics adapter with more fillrate.
And search the forum for additional hints.

MickeyMouse
12-12-2002, 01:17 AM
All you can do is disable depth testing as well as depth writing.
Also GeForce2MX is a card that noticeably suffers from fillrate issues. Anyway drop from 150 to 108 fps is not that bad, at least not something you should seriously worry about.

Relic
12-12-2002, 02:08 AM
Just noticed you're using "antialiased" quads, you mean GL_POLYGON_SMOOTH? Don't do that, it's slow, and for fog effects it's just pointless.

LordOfTheUniverse
12-12-2002, 01:39 PM
I think it has somethong to do with
alpha blending - any hints?

Relic
12-13-2002, 04:50 AM
Well, search the web for "redbook.pdf". Blending, alpha test, and antialiasing and there connection is explained there.
Did you try what people suggested?

LordOfTheUniverse
12-13-2002, 01:07 PM
Not yet, except for GL_POLYGON_SMOOTH,
but I have redbook.pdf and try it ASAP;
THX
LordOfTheUniverse