nAo said:
I perfectly understand what you are saying, in fact I'm not saying it can't be done..so I really don't need you show me anything. What I'm saying is that doing the same stuff with VS3.0 is probably much better. I doubt a current CPU can hide memory latencies better than a GPU in the general case.
NV40 has 6, multithreaded, vertex shader pipelines.
Even with a medium size shader the GPU will have tens to hundreds cycles to hide textures sampling latencies.
ciao,
Marco
If you can remove the need to use vertex textures, there will be no latency to hide to begin with. I already admitted that this is not possible (or sane, for performance reasons) for
all uses of vertex texturing. I'm really only interested in those cases where you have the same amount of draw calls and the same amount of required memory objects.
(I'd count a bound vertex texture and a bound attribute stream interchangeably as an abstract bound memory object)
You can remove vertex texturing if you look up the texture with texcoords that
do not depend on vertex position
after transformation. And you can still scale/rotate/whatever the "texture sample"
after the "lookup".
You can not do what NVIDIA's spiky sphere demo does, without vertex textures, because the tex
coords for the displacement map can be scaled over the object surface by the user. You could however implement displacement strength scaling (length of spikes) just fine. Any displacement that's local to the mesh in question can be done, fast enough(TM).
Animated displacement mapping is no problem either
if it is done by respecifying the vertex texture, or by just binding another one, or by interpolating between two vertex textures etc. Vertex textures can be stored in more compact data formats than vertex attribute streams, so you'd blow more space and bandwidth. But there won't be a functional difference. Both approaches require you to break the current batch just the same.
I think this approach would be practical for most terrain rendering and character/object meshes. Deformable or static.
If you animate the displacement by moving/scaling/rotating, etc, displacement texcoords
before you do the lookup, it
won't work. That's the spiky ball, and it may be something you want to do for animated water waves and the like.