View Full Version : vertex prog vs. ogl

06-13-2002, 04:23 AM

Assuming I have a nvidia card, on which I can implement vertex programs:

What's faster now: fog via OpenGL or fog via vertex programs?

06-13-2002, 04:44 AM
none. it's still the same gpu....

...but it depends on how slow you implement your vertex program. i think it could be possible to write a vertex programm which is much slower than the standard fog version. http://www.opengl.org/discussion_boards/ubb/wink.gif

[This message has been edited by AdrianD (edited 06-13-2002).]

06-13-2002, 04:49 AM
Originally posted by AdrianD:
none. it's still the same gpu....

And for which reason should I use a vertex program then? To loose my hardware independency?

I just need fog and I'd like to implement the fastest method.

06-13-2002, 04:52 AM
You don't need vertex programs if you just need standard fog. Just because they are there, it doesn't mean you have to use them.

Vertex programs are for doing more complex things that are not available otherwise. If you had a completely new fog formula, you would have to implement it with vertex programs.


06-13-2002, 04:54 AM
vertex programs are for programming your own vertexprograms. that is needed where you dont have simple functions to set up your stuff.. in your case: say you want volumetric fog. you cant glEnable(GL_VOLUMETRIC_FOG); glFogObject(GL_FOG0,GL_SPHERE); glFogPos(GL_FOG0,x,y,z); glFogSize(GL_FOG0,radius); etc..
so there you have to code your own pipeline, with own vertexprograms, own texture-settings, own blendingfunc/multipassaproaches, what ever..

thats why vertexprograms are existing. they let you do stuff in hardware where there is no support else. setting up bumpmapping/perpixellighting. before, you had to calculate to_tangentspace(point_to_light) by hand in software, very slow for detailed geometry. now a vertexprogram can do this automatically for you.

look at the demos on nvidias and atis homepages, they show a lot of fancy stuff not possible else.. deformation of geometry, autobillboarding etc.. just what ever you want. (more or less, for really what ever you want, wait for gl2.0 http://www.opengl.org/discussion_boards/ubb/smile.gif)

06-13-2002, 04:57 AM
Oh ok, thanks, I guess I got it.

I only need standard fog.

The best choice would be then the 'ogl fog', right?

06-13-2002, 05:04 AM
...and I guess then, that vertex programs are only a makeshift for a too delayed new version of opengl.

You know I like this 'fancy' stuff, but I think it's a high price to loose HW independency, assuming that not everybody has a GeForce.

06-13-2002, 05:06 AM
wait for gl2.0, then you get programable hardware on all gpu's that support it. not as ext, but as base. then you can code your own fancy fog-algo, and it works on all future hw..

06-13-2002, 05:12 AM
Originally posted by davepermen:
wait for gl2.0, ...

Does anybody know, how long we have to wait for this?

06-13-2002, 05:28 AM
dunno, next year?

Julien Cayzac
06-13-2002, 08:09 AM
Originally posted by A027298:
Does anybody know, how long we have to wait for this?

You can read the ARB meetings notes (http://www.opengl.org/developers/about/arb.html) for such info.