Sign in to follow this  
Raeldor

Efficient UV Streams

Recommended Posts

Raeldor    254
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
Muhammad Haggag    1358
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
Scoob Droolins    258
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

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