Jump to content
  • Advertisement
Sign in to follow this  
Raeldor

Efficient UV Streams

This topic is 4875 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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!