Tweaked opengl terrain tessellation to speed up rendering

This commit is contained in:
Michaël Lemaire 2015-08-12 17:26:17 +02:00
parent 84e9d6c896
commit 44c03e46a9
2 changed files with 4 additions and 4 deletions

View file

@ -203,15 +203,15 @@ void ExplorerChunkTerrain::updatePriority(CameraDefinition* camera)
{
_texture_wanted_size = 2;
}
else if (distance_to_camera < 50.0)
else if (distance_to_camera < 60.0)
{
_texture_wanted_size = _texture_max_size;
}
else if (distance_to_camera < 100.0)
else if (distance_to_camera < 140.0)
{
_texture_wanted_size = _texture_max_size / 4;
}
else if (distance_to_camera < 200.0)
else if (distance_to_camera < 300.0)
{
_texture_wanted_size = _texture_max_size / 8;
}

View file

@ -58,7 +58,7 @@ void OpenGLTerrain::initialize()
program->addFragmentSource("terrain");
// Add terrain chunks
int chunks = 20;
int chunks = 12;
double size = 800.0;
double chunksize = size / (double) chunks;
double start = -size / 2.0;