Archived

This topic is now archived and is closed to further replies.

Wavewash

Terrain Texture Blending Screenshot

Recommended Posts

Wavewash    202
The way I textured my terrain was that I created 2 vertex buffers. The first vertex buffer is for my base texture. The vertex color for that always has an alpha value of 1.0. My second vertex buffer contains the same information as the first vertex buffer except that the alpha information for the vertex is taken from a bitmap file that shows were the texture should be shown and how transparent it is. I do that as follows: pVertTB->color=D3DXCOLOR(shade,shade,shade,float(alphamap.buffer[counts*3])/256.0f); Then I render the base vertex buffer and then the second vertex buffer switching textures. It seems to be running at the same speed even though it''s rendering each triangle twice. I''m a newbie as this is my first time doing a terrain engine. Does anyone have a method that may be more effective then my method and may look better? I have a feeling as though my terrain has some skin disease like Micheal Jackson. Any way... comments, critism, or ways to do the blending better would be appreciated.

Share this post


Link to post
Share on other sites
Wavewash    202
I would like to but the problem is that one needs the color of the verts to be full on alpha, and the other varies. Hmm... maybe I can render the first texture with the same vert buffer if I disable alphablending. Hmm.. Thanks. I''ll try and change it.

Share this post


Link to post
Share on other sites