View Full Version : Vertex program
A027298
05-24-2002, 04:05 AM
Gang,
Does anybody know a good tutorial or a good book about 'vertex programs' in OpenGL? I searched google and I didn't find very much stuff about this subject.
I would appreciate it, if anyone could give me good pointers or book titles about this subject.
Thanks a lot.
knackered
05-24-2002, 04:10 AM
It's an NVidia specific extension.
Go to this site, and use their internal search engine to find information:- http://developer.nvidia.com/
A027298
05-24-2002, 04:34 AM
Does it make sense to use vertex programs? ok, I am depending on a NVIDIA card. But do I get a big performance gain, when I do for instance my lighting with a vertex program instead doing it with the normal OpenGL commands?
AdrianD
05-24-2002, 05:26 AM
In vertex programms you can do much more than lighting only.ie.: you can use them to deform your mesh.
A027298
05-24-2002, 05:46 AM
Yes I know. But for example, is the lighting with vertex programs faster than the lighting with the normal opengl commands?
Robbo
05-24-2002, 06:09 AM
Speaking of mesh deformation, is it possible to perform displacement mapping with vertex program? I mean I'm not 100% sure that a texture one might like to use to displace a mesh will be available for reading by a vertex program. At present my displacement mapping is done as a `preprocess' stage on the CPU and is too slow to be real-time.
Devulon
05-24-2002, 06:58 AM
In general I am under the impression that the Programs are slower than the Fixed Function/T&L Path. In the case of implemented a Program to do exactly the equivalent of the fixed function path. Of course as stated there is no reason to do this other than if you need a small amount of fixed T&L mixed with other complex Programs.
Devulon
davepermen
05-24-2002, 07:50 AM
normally you don't need to simulate the fixed function pipeline in a vertexprogram, but only the parts you need from it. that means for example, if you are at the outside and you have the blue sky wich shines from above, simply take the z of the normal and you got the shading (you can even add some constant to it for more diffusion/ambientation of the term http://www.opengl.org/discussion_boards/ubb/wink.gif). then vp's get much faster.
AdrianD
05-24-2002, 07:58 AM
"Speaking of mesh deformation, is it possible to perform displacement mapping with vertex program? I mean I'm not 100% sure that a texture one might like to use to displace a mesh will be available for reading by a vertex program."
I am 100% sure: it's NOT possible.
You can't read the texturedata in a Vertex programm.
A027298
05-24-2002, 08:05 AM
Thanks for your replies.
But actually, I need only to light my textured terrain. And I am wondering which technique I should use:
- OpenGL light?
- a vertex program which handles the light stuff?
- perpixel lighting?
- or calculate my own lightmaps/shadows and combine them with the textures?
davepermen
05-24-2002, 08:17 AM
Originally posted by AdrianD:
I am 100% sure: it's NOT possible.
You can't read the texturedata in a Vertex programm.
well.. this will change.. vp2.0 will have this possibility, if it will ever exist (possibly gl2.0 will be faster http://www.opengl.org/discussion_boards/ubb/wink.gif)
remember the displacementmapping of the new matrox, it actually only is part1:realtimetesselation_of_geometry and part2:texturelookup in a vertexprogram..
now with wich extension we'll use this feature, we don't know yet, but at least in gl2.0 it will be in http://www.opengl.org/discussion_boards/ubb/smile.gif and i guess nvidia will have it on the nv30 in a vp2.0 program language..
Pacome
05-25-2002, 02:00 AM
A027298,
there are very easy and well-done tutorials about vertex programs on this website : http://www.chronos-central.com/index.shtml
Hope this help.
Pacôme
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.