Jump to content
  • Advertisement
Sign in to follow this  
starfleetrp

Repeating texture

This topic is 4315 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, I am wondering if there is a better way to make a repeating background. The most common example that I can think of would be water. The way I am doing it is
for(number of tiles in X direction)
  for(number of tiles in y direction)
    renderImage
Is there a better way than having to do this 100 times in each direction so that 10 000 times?

Share this post


Link to post
Share on other sites
Advertisement
You can change the UV value. For example a quad, starting at top left going clockwise, with UV value of (0,0), (10,0), (10,10), (10,0) will repeat the texture 10 times for both directions.

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!