More detailed terrain tessellation in opengl renderer
This commit is contained in:
parent
7dd70e7bca
commit
f19433457e
1 changed files with 2 additions and 2 deletions
|
@ -37,7 +37,7 @@ ExplorerChunkTerrain::ExplorerChunkTerrain(OpenGLRenderer* renderer, double x, d
|
||||||
lowest = 0.0;
|
lowest = 0.0;
|
||||||
highest = 0.0;
|
highest = 0.0;
|
||||||
|
|
||||||
tessellation_count = 33;
|
tessellation_count = 65;
|
||||||
tessellated = new VertexArray<TerrainVertex>();
|
tessellated = new VertexArray<TerrainVertex>();
|
||||||
tessellated->setGridSize(tessellation_count);
|
tessellated->setGridSize(tessellation_count);
|
||||||
tessellated->setAutoGridIndices(tessellation_count);
|
tessellated->setAutoGridIndices(tessellation_count);
|
||||||
|
@ -87,7 +87,7 @@ bool ExplorerChunkTerrain::maintain()
|
||||||
{
|
{
|
||||||
while (_tessellation_current_size < _tessellation_max_size)
|
while (_tessellation_current_size < _tessellation_max_size)
|
||||||
{
|
{
|
||||||
int new_tessellation_size = _tessellation_current_size ? _tessellation_current_size * 4 : 2;
|
int new_tessellation_size = _tessellation_current_size ? _tessellation_current_size * 4 : 4;
|
||||||
int old_tessellation_inc = _tessellation_current_size ? _tessellation_max_size / _tessellation_current_size : 1;
|
int old_tessellation_inc = _tessellation_current_size ? _tessellation_max_size / _tessellation_current_size : 1;
|
||||||
int new_tessellation_inc = _tessellation_max_size / new_tessellation_size;
|
int new_tessellation_inc = _tessellation_max_size / new_tessellation_size;
|
||||||
float internal_step = 1.0f / (float)_tessellation_max_size;
|
float internal_step = 1.0f / (float)_tessellation_max_size;
|
||||||
|
|
Loading…
Reference in a new issue