Original Post
I wanted some objects in my game to be multitextured so i used pixel shader but i want this effect on certain object only. but the effect of multitexturing appeared on every object that are drawn after setting
Device->SetTexture(ShadeTexDesc.RegisterIndex, ShadeTex);
Device->SetSamplerState(ShadeTexDesc.RegisterIndex, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR);
Device->SetSamplerState(ShadeTexDesc.RegisterIndex, D3DSAMP_MINFILTER, D3DTEXF_LINEAR);
Device->SetSamplerState(ShadeTexDesc.RegisterIndex, D3DSAMP_MIPFILTER, D3DTEXF_LINEAR); where ShadeTexDesc.RegisterIndex=2 every other objects drawn after that are multitextured despite that the vertex format of this objects doesn't allow that
struct Vertex
{
float x,y,z;
float u,v;
Vertex(float X,float Y,float Z,float U,float V)
{
x=X;
y=Y;
z=Z;
u=U;
v=V;
}
static const DWORD FVF;
};
const DWORD Vertex::FVF =D3DFVF_XYZ|D3DFVF_TEX1; So does anyone knows the reason or what i did wrong thanks in advace;