Jump to content
  • Advertisement
Sign in to follow this  

Texture Splatting Question

This topic is 4788 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 read this article: http://www.gamedev.net/reference/articles/article2238.asp I'm trying to adapt this method for use in my terrain engine. I've run into a bit of a problem. From the article:
Each chunk has the base textures repeated several times over it – but the alphamap is stretched over the entire area. (0, 0) of the chunk would have alphamap coordinates of (0, 0) and texture coordinates of (0, 0). (33, 33) of the chunk would have alphamap coordinates of (1, 1) and texture coordinates of (x, x), where x is the number of times you want the textures to be repeated.
My question is, if I am rendering the geometry only once and combining the texture with the alpha map in the texture units, how can I make the alpha map use different texture coordinates than the texture? It seems like the (u,v) for the alpha map will always be the same as the (u,v) in the texture map, and thus instead of being stretched over the entire terrain, the alpha map will tile with the texture (rendering it essentially useless). Any thoughts? Thanks, -Jeremy

Share this post

Link to post
Share on other sites
Guest Anonymous Poster

FLOAT x, y, z;
//FLOAT nx, ny, nz;
FLOAT u1, v1; //for texture1
FLOAT u2, v2; //for alphamap

i think this should work..

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!