Page 1 of 1

Terrain Mesh Performance

Posted: Tue Jul 02, 2019 4:08 am
by crancran
Like most large expansive worlds, I've broken my game's terrain into equally divided tiles. But one thing I have come to realize is that each tile uses the same x/y coordinates for each vertex, its just that for each tile those coordinates are offset by the grid position of that tile.

That said, I have been wondering whether it would be faster to construct a single VBO with the common x,z vertex pattern and pass to the vertex shader a few parameters such as the tile's x/z offset and a heightmap texture that I would sample to get the height. The idea is to try and minimize the video memory used for terrain, saving it for models and other objects in a large scene.

Any thoughts or ideas? Would that be feasible or would just passing the Vector3 to the shader with the full X/Y/Z already resolved the best way?