Terrain rendering with indexes
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
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement