SetTextureStageState blending texture with material

Started by
1 comment, last by snakekain 20 years, 8 months ago
how can i blend the texture and material colors set by SetMaterial and SetTexture functions. SetTextureStageState can take the constant D3DTA_TEXTURE to set it to a color argument but i found no constant that can take the currently set material.Did i forget to tell that i turned off the lights SetRenderState(D3DRS_LIGHTING,false); thanks for advance. [edited by - snakekain on July 27, 2003 6:26:13 PM]
Advertisement
Materials aren''t something you just treat as variables. The values in them are used by D3D when it''s doing lighting to tell it how to treat the final values from your texture stage states. Ie it does all your blends then finally that colour is multiplied by a value obtained from the lights turned on, the world ambient value (from D3DRS_AMBIENT) and the colour values from the material. I THINK the material ambient colour tells it what proportion of the ambient light is reflected from the surface ie how much you see, the material diffuse colour tells it what proportion of direct light is relected and so on but the mathematical details are a little confusing to me without the docs. Look in the SDK docs under lighting or something. But my general explanation is true
Thanks for your reply i got the idea.

This topic is closed to new replies.

Advertisement