Archived

This topic is now archived and is closed to further replies.

SetTextureStageState

This topic is 5127 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ok, i just got multi-texturing working with my terrain, but to get the fixed function lighting to work i had do do this:
//set the multitexture states
mlpD3DDevice->SetTextureStageState(0,D3DTSS_COLORARG1,D3DTA_TEXTURE);
mlpD3DDevice->SetTextureStageState(0,D3DTSS_COLORARG2,D3DTA_DIFFUSE);
mlpD3DDevice->SetTextureStageState(0,D3DTSS_COLOROP,D3DTOP_MODULATE);
 
my question is, why does D3DTA_DIFFUSE also add the ambient component and not just the diffuse component of the vertex? the sdk says D3DTA_DIFFUSE The texture argument is the diffuse color interpolated from vertex components during Gouraud shading. If the vertex does not contain a diffuse color, the default color is 0xFFFFFFFF. Permissions are read-only.

Share this post


Link to post
Share on other sites