Sign in to follow this  

using seperate vertex, normal, uv buffers

This topic is 3575 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

is there anyway to seperate the vertex structure into seperate streams of data.. .instead of a single stream of verticies ( ie. which contain position, tex coords, normals, ... ). I havent done a comparison, but it would minimize the redunancy ( of data ) in the vertex list while using less memory ( perhaps marginally, but it depends ) while at no cost to speed ( at least there shouldnt be since we are just indexing data ). has anyone implemented this with directx10? Thanks, -Velik

Share this post


Link to post
Share on other sites
As far as I know, there is no way to have indices for seperate vertex elements. There can only be an index per vertex ('vertex' in this context refers to the complete position/normal/texture/etc data, not just the position data). It would be nice if you could have indices per element, but I don't think it's possible.

That being said, I'm no Direct3D guru.

Share this post


Link to post
Share on other sites
I haven't gotten around to dx10 yet, so I can't say whether it's possible there, but in dx9 you're pretty much out of luck. It's worth mentioning though that there would likely be a performance hit if you WERE able to do this, as fetching those attributes from different spots in memory hurts the vfetch (as they're no longer contained in one contiguous block)... plus the vertex cache would have to know how to handle that, which, AFAIK, they're generally built on the idea of a single index -> vertex; performing such a custom fetch pattern would likely invalidate the cache, causing you to fetch each vertex anew, which is bad bad bad.

Share this post


Link to post
Share on other sites
If I understand correctly, you want to index into streams of data, for example, for your first vertex you'd want to take vertex position 3, normal 7 and texture coords 11. If this is what you want (as opposed to normal streams, which are indexed together), then you should realise that:

- It could take more memory, since you need to keep additional indices.

- It'd be slower, since you must do several dependent reads, each using a different index.

Still, it shouldn't be too difficult to achieve. You can read your indices as the vertex stream, then use constant buffers or texture buffers to read the rest of the data. However, this would end up slower than just using a normal vertex structure.

Share this post


Link to post
Share on other sites

This topic is 3575 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this