Sign in to follow this  

Applying a texture to geometry without it being influenced by lighting

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

This topic is 3489 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this