Jump to content
  • Advertisement
Sign in to follow this  
Revenant

Applying a texture to geometry without it being influenced by lighting

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

I was wondering if it is possible to apply a particular texture to a part of a model that does not receive any lighting from an ambient source. Instead the texture would be displayed in a sense "full bright." Is it possible to do this in DirectX? BTW I'm using the latest SDK for DX and am programming this in C++. Thanks! EDIT: Gave your thread a more descriptive title than 'untitled'.. [Edited by - jollyjeffers on May 26, 2008 10:45:19 AM]

Share this post


Link to post
Share on other sites
Advertisement
Yes, it is absolutely possible to do this.

Are you using shaders or fixed-function?

For shaders it'd be a trivial case of not multiplying by the light contribution for the specified area. For fixed-function you can reconfigure the blending stages to ignore the diffuse or material component and just output the texture directly:

SetTextureStageState(0,D3DTSS_COLOROP,D3DTOP_SELECTARG1);
SetTextureStageState(0,D3DTSS_COLORARG1,D3DTA_TEXTURE);
SetTextureStageState(1,D3DTSS_COLOROP,D3DTOP_DISABLE);

Should do the trick, but you'd best double check the docs as I don't do FF blending anymore!

hth
Jack

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!