Jump to content
  • Advertisement

Archived

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

Chozo

Multitexturing question

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

Is it possible to do multitexturing with different sized textures? Like if I want a light flare (16x16) from an object to map onto a background texture (256x256) without using 2 passes, is that possible? Or is multitexturing just for when you have 2 textures of the same size?

Share this post


Link to post
Share on other sites
Advertisement
So how do you position the smaller one within the bigger one? The examples I''ve seen for multitexturing select the first, then the second texture, then give the tex coords for each texture, then one single vertex. If I try this with different sized textures, the smaller ends up wrapping or scaling to the size of the bigger. Do you just specify the coords/vertices seperately (like, one glMultiTexCoord2fARB per vertex instead of two glMultiTexCoord2fARB per vertex)?

Share this post


Link to post
Share on other sites
The best way to do what you''re trying to achieve would be to just draw the texture as a separate quad and blend it with the background texture. The small texture will need its own vertices, not just its own texture coords.

Share this post


Link to post
Share on other sites
If you insist on multitexturing, you can use a clamped texture instead of repeating, so it won''t tile (GL_CLAMP, GL_CLAMP_TO_EDGE). Set the texture coordinates so that {0...1} is where you want the texture to show up.

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!