• Advertisement

Archived

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

Multitexturing question

This topic is 5300 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
The textures can be different sizes. You can even wrap the textures differently for the different units, since each unit has its own texture coordinates.

Share this post


Link to post
Share on other sites
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