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.
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?
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.
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.
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 ). then vp’s get much faster.
“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.
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 )
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 and i guess nvidia will have it on the nv30 in a vp2.0 program language…