Multiple Texture Coords?
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?
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement