Jump to content
  • Advertisement
Sign in to follow this  
executive

Multitexturing question

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

Hi all, I have a question about multitexturing. I have a texture that must be rendered to my vertices and after that rendering I have another texture which is as big as my viewport. That texture is a sort of mask and must be put over my whole output. I thought to use the D3DTOP_MODULATE but the problem with that is that my mask texture is mapped on my vertices and not on my screen, so the mask isn't applied correct. Can I set to use the screen coordinates instead of the vertex coordinates? Or how can I solve this? Thank you VERY much in advance!!!!! Nicolas

Share this post


Link to post
Share on other sites
Advertisement
You want to look up "Texture Coordinate Indexing" for this:

Pull up the "Tut05_Textures" sample from the DX-SDK (on my system its in Samples\C++\Direct3D\Tutorials\Tut05_Textures). At the top of the file you need to add #define SHOW_HOW_TO_USE_TCI. Compile/run just to verify that it does what you want it to do [smile].

Jump to line 244 in the source, and you'll find the bit where it sets up the texture matrix.

I'm not sure how to set it up as a secondary blending stage (multi-pass isn't hard), but it should at least point you in the right direction!

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!