Multiple Texture Coords?

Started by
1 comment, last by SquareDanceSteve 19 years, 7 months ago
How would i set up multiple texture coordinate system? I have a terrain with a low detail map and i want to apply a repeating detail map, how? how would i load the multiple texture coords into the vertex buffer?
-----------------www.stevemata.com
Advertisement
If I understood your question, you can add another pair of uv coordinates, like:

struct MY_VERTEX
{
vector3 pos;
vector3 normal;
vector2 uv0, uv1;
};

And then use the follwing FVF: (D3DFVF_XYZ|D3DFVF_NORMAL|D3DFVF_TEX0|D3DFVF_TEX1).

But what I would do is to use vertex shaders copying the first stage coordinates to the oT0 and oT1 registers, unless you wish to use diferent values for the both textures.
Well i am doing multipass rendering, i cant figure out how to load my vertex buffer with 2 sets of uv coords

i see the option to select which set of uv coords but i odnt know how to load em
-----------------www.stevemata.com

This topic is closed to new replies.

Advertisement