View Full Version : Vertex Shaders(do I understand?)
03-01-2002, 07:37 PM
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.
03-02-2002, 05:51 AM
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.
03-02-2002, 05:53 AM
03-02-2002, 06:12 AM
Vertex labs from NVIDIA (http://developer.nvidia.com) ?
03-02-2002, 08:44 AM
I will be playing around with this for a while.
03-02-2002, 09:11 AM
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.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.