Sign in to follow this  

Efficient UV Streams

This topic is 4531 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

I am using multi-streaming and noticed that I have to provide a UV stream for each texture stage. This seems crazy, as the UV co-ordinates are the same for each stage. Is there any way I can use the same stream to provide the UV's to all stages, or do I have to create multiple streams using the same buffer? Thanks Rael

Share this post


Link to post
Share on other sites
You can determine, for each texture stage, which texture set gets used using the D3DTSS_TEXCOORDINDEX member of D3DTEXTURESTAGESTATE. For example:

device->SetTextureStageState(1, D3DTSS_TEXCOORDINDEX, 0);

...binds the first uv set to the second texture stage.

Share this post


Link to post
Share on other sites
You can have multiple UV sets in a single stream - use 4 sets per stream, for example, to minmize the number of streams. Beware that multiple streams will cost performance. Also note that Coder's solution will not work with ps1.x - you must directly map tc index to stream (0->0, 1->1, etc).

Share this post


Link to post
Share on other sites

This topic is 4531 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