Vertex Shaders(do I understand?)

So when a vertex shader is doing a bump map it’s calculating the proper color map real time? That would mean it would have to calculate the binormal and tangent per vertex, right?

I don’t know asm so this is a really tough subject to me(Boy I can’t wait for the next ver of OpenGL).

You calculate your tangent space before. (You could also do it in a vertex shader, but why waste the cycles since you really only need to calculate tangent space once).

You simply pass the normal, binormals and tangents as
parameters to your vertex shader.

Odds are you wouldn’t be able to compute a consistent set of tangents and binormals in a vertex program.

This means you have to pre-compute at least one of the two (tangents, for instance).

Then, depending on your relative memory/speed requirements, you can compute the binormal in the vertex program with a cross product (pretty cheap instruction-wise) or pre-compute it and submit it as a vertex parameter each frame, which may even be slower if you are bus-bandwidth or memory limited.

– Zeno

I can’t seem to find any vertex program sample programs anywhere. I’d like to compair the NVvertex documents with a working program so I can start understanding this stuff. I remember last time I stopped researching it because I couldn’t find a working program.

http://www.nutty.org/OpenGL/Nvidia/index.html

Vertex labs from NVIDIA ?

(NVSDK)

Thx Nutty!

I will be playing around with this for a while.

Man this stuff is getting complicated! Totaly overwhelming. I guess it’ll take me a while to ingest this stuff. At least I somewhat understand the lighting operations.