Jump to content
  • Advertisement
Sign in to follow this  
langtudontinh

Apply texture to two opposite sides of a quad.

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

Advertisement
You can't apply two textures to one quad, you need to make a second quad, which is at the same location but faces the opposite direction.

edit to clarify: disabling backface culling would show the texture of the quad on the other side as well (but mirrored). I don't think that's what you want...

Share this post


Link to post
Share on other sites
Or, determine which side of the quad is facing the camera (simple dot product) and assign the texture that corresponds with that side.

Share this post


Link to post
Share on other sites
Quote:
Original post by Amodim
Or, determine which side of the quad is facing the camera (simple dot product) and assign the texture that corresponds with that side.


Pls describe more detail about "simple dot product" to check which side is facing the camera.

ltdt.

Share this post


Link to post
Share on other sites
Quote:
Original post by langtudontinh
Hi everyone!
I have two textures and want to apply these into 2 sides of a quad. Could anyone show me the way?
Thank you.

ltdt.

You could use only one quad and rendering it two time per frame. That is: Render it once with the texture 1. Set the texture 2, rotate the quad by 180 degrees and render it again.

Share this post


Link to post
Share on other sites
I have some more question:
Could I apply 2 texture into 2 sides (by turning culling on) while tweening (morphing) from a quad into a cylinder???

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!