• Advertisement
Sign in to follow this  

Texture coords + atlas

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

I want to use texture atlas to create big terrain (using vs, fs, maybe gs). But I have one big problem - I need coordinates to choose intensity of texture (per vertex). Maybe it's possible to do it better but it's my idea - maybe it will be good - I don't know. So we have texture atlas like link What's wrong? I want to use for example only one texture from atlas but it should be repeated. Now I have repeated atlas. It's easy to choose one texture (snow for example) and stretch it:
fragColor2 = texture2D(firstTexture, (fragmentTexCoord2*vec2(0.25,0.25)+vec2(0,0.5)));
But I can't repeat only one texture using sth like it:
fragColor2 = texture2D(firstTexture, (fragmentTexCoord2*vec2(0.25,0.25)+vec2(0,0.5))*vec2(16,16));
- we can see effect like link Any ideas? -------------------------- Ok, done. [Edited by - _OskaR on November 9, 2009 5:14:40 PM]

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement