#### Archived

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

# Terrain rendering with indexes

This topic is 6106 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hello again everyone, here is post about a little confusion that I have and that blocks me in me engine design... Look at this: These are your points in your map *---*---*---*---*---* |    |    |    |    |    | *---*---*---*---*---* |    |    |    |    |    | *---*---*---*---*---* |    |    |    |    |    | *---*---*---*---*---* |    |    |    |    |    | *---*---*---*---*---* |    |    |    |    |    | *---*---*---*---*---* Each point has a TU and TV for texturing, right ? Let's zoom for a single "tile", the higher left one: *---------*---- |        /  | |      /    | |    /      |    / |  /        |  / *---------*---- |        /  | |      /    | If the upperleft vertice have (0.0f, 0.0f) and (1.0f, 1.0f) in the lowerright vertice in (TU, TV) coordinates. The question is : "Take the last considerations I've showed you, does the tile at the right side of the upperleft tile of the terrain will have a lowerleft vertex with texture coordinates (1.0f, 1.0f) (I mean while using a index buffer that the purpose is for reusing vertices). Imagine if this tile must not have (1.0f, 1.0f) coordinates, but (0.0f, 1.0f) because it uses another texture or another region of the texture. Do you have to use special texture coordinates or draw quads like this ?" *---------* *---------* |        /  |   |        /  | |      /    |   |      /    | |    /      |   |    /      | |  /        |   |  /        | *---------* *---------* *---------* *---------* |        /  |   |        /  | |      /    |   |      /    | |    /      |   |    /      | |  /        |   |  /        | *---------* *---------* Thanks in advance for clarifications
/* Bullmax */ ------------- Reality has many forms : good and evil, black and white, ying and yang. Edited by - Bullmax on February 5, 2002 12:20:52 AM

##### Share on other sites
I do the below method you described (put vertexes in same spot.) But thats just me =) I probably don''t do it "right."

What you could probably do is check the X of the quad, make it 0,0 if its odd, make it 1,1 if its even...

You could probably play with it and find a way that is comfortable to you and has good performance.

##### Share on other sites
I wonder if what I meant is called texture multipassing...

/* Bullmax */
-------------
Reality has many forms : good and evil, black and white, ying and yang.

1. 1
Rutin
46
2. 2
3. 3
4. 4
5. 5

• 12
• 10
• 12
• 10
• 13
• ### Forum Statistics

• Total Topics
632991
• Total Posts
3009752
• ### Who's Online (See full list)

There are no registered users currently online

×