vertex prog vs. ogl

Gang,

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?

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.

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

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.

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.

Greetings
Overmind

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 )

Oh ok, thanks, I guess I got it.

I only need standard fog.

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

…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.

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…

Originally posted by davepermen:
wait for gl2.0, …

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

dunno, next year?

Originally posted by A027298:
Does anybody know, how long we have to wait for this?

You can read the ARB meetings notes for such info.

Julien.