Sign in to follow this  
_OskaR

Texture coords + atlas

Recommended Posts

_OskaR    144
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this