Fixed Function Pipeline - DX9

Started by
0 comments, last by Robbo5000 6 months ago

FFP is old now but I need to fade in the 2nd emissive texture colors into the first one.

I can use D3DTOP_ADD to add it @ 100% but not any other method without adding in the black transparent color as well. This is my code so far:

Hope someone can help me get the variable (inValue) input part working…..

DWORD inValue;

inValue = D3DCOLOR_ARGB(20,20,20,0);

pID3DDevice->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_MODULATE4X);

pID3DDevice->SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TEXTURE);

pID3DDevice->SetTextureStageState(0, D3DTSS_COLORARG2, D3DTA_DIFFUSE);

pID3DDevice->SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_DISABLE);

pID3DDevice->SetTextureStageState(1, D3DTSS_TEXCOORDINDEX, 0);

pID3DDevice->SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_MODULATE);

pID3DDevice->SetTextureStageState(1, D3DTSS_CONSTANT, inValue);

pID3DDevice->SetTextureStageState(1, D3DTSS_COLORARG1, D3DTA_CONSTANT); // variable input

pID3DDevice->SetTextureStageState(1, D3DTSS_COLORARG2, D3DTA_TEXTURE); // tex 1

This topic is closed to new replies.

Advertisement