Would this be a good recommendation to ARB?

I am trying to calculate my tangent vectors, and so far unsuccessful, but seems to me it would easy to implement into the VS a function that takes the gl_Normal, gl_MultiTexCoord, and gl_Vertex as parameters and return the tangent vector

vec3 tangentVector = tangent(gl_Vertex, gl_Normal, gl_MultiTexCoord0.xy);

I know it would be slower but for dynamic meshes ect… I see a use for it, and with VS usually sitting around due to FS are burdened more so than the VS…

This won’t work unless you have all Vertex and Texture Coordinate information of all surrounding vertices.

Maybe with some sort of DirectX geometry shader (or whatever it is called) this will be possible.

Originally posted by Corrail:
[b]This won’t work unless you have all Vertex and Texture Coordinate information of all surrounding vertices.

Maybe with some sort of DirectX geometry shader (or whatever it is called) this will be possible.[/b]
I’m not sure of what the directX geometry shaders are. I do see the usefullness in having some control over which verticies are sent to the vertex shaders. If you store your mesh as a big grid, and had a “primitive assembly” shader you could render the mesh as a series of strips, without interacting with user space.

ie.

verticies stored as:

00-01-02-03-04-05-06-07
|/ |/ |/ |/ |/ |/ |/ |
08-09-10-11-12-13-14-15
|/ |/ |/ |/ |/ |/ |/ |
16-17-18-19-20-21-22-23

if there were a programable “primitive assembly” shader then a simple program would be able to autogenerate triangle strips for this without the need to include an index array – a great savings in memory.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.