Jump to content
  • Advertisement

Archived

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

snakekain

SetTextureStageState blending texture with material

This topic is 5539 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

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]

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!