Jump to content
  • Advertisement
Sign in to follow this  
Roof Top Pew Wee

[Solved] Is it possible to set the texture state to do (texture + tfactor)*diffuse?

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

Up til now, I've been using a TFactor and Add or Modulate ColorOperation to simulate light on my objects. I've started to read about using real lights, but it looks like although i can have 3 color aruments, I can only give one color operation. Is there anyway to do the following: device.TextureState[0].ColorArgument0 = TextureArgument.TextureColor; device.TextureState[0].ColorArgument1 = TextureArgument.TFactor; device.TextureState[0].ColorArgument2 = TextureArgument.Diffuse; And have the TFactor be added to the TextureColor, then the result Modulated by the Diffuse? Is the only way to do this to use vertex or pixel shaders? Thanks for any feedback. --Vic-- [Edited by - Roof Top Pew Wee on January 20, 2006 12:11:35 PM]

Share this post


Link to post
Share on other sites
Advertisement
You can use two texture stages. Most modern cards have up to 8.

device.TextureState[1]...
device.TextureState[2]... etc.

All you need to do is set ColorArg1 on the next stage to "Current", which means it takes the result of the last stage, set ColorArg2 to what ever you want, and set the op to whatever you want. Pretty simple.

Hope this helps.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!