diff --git a/TODO b/TODO index d59474e..9185bd8 100644 --- a/TODO +++ b/TODO @@ -2,7 +2,6 @@ Technology Preview 2 : - Add initial terrain offset so that the (0,0) coordinates are above water (to avoid starting at the middle of a sea). - Use water height as 0.0 (offset the terrain). - Add missing cloud models. -- Fix the terrain walker hitting displacement immediately at high quality. - Finish material dialog. - Finish texture dialog. - Fix rendering when inside a cloud layer, with other upper or lower layers. diff --git a/src/render/software/TexturesRenderer.cpp b/src/render/software/TexturesRenderer.cpp index 5e468eb..056881a 100644 --- a/src/render/software/TexturesRenderer.cpp +++ b/src/render/software/TexturesRenderer.cpp @@ -107,7 +107,7 @@ static Vector3 _getDetailNormal(SoftwareRenderer* renderer, Vector3 base_locatio pivot = VECTOR_UP; } dx = base_normal.crossProduct(pivot).normalize(); - dy = base_normal.crossProduct(dx); + dy = base_normal.crossProduct(dx).normalize(); /* Apply detail noise locally */ Vector3 center, north, east, south, west; @@ -191,7 +191,8 @@ TexturesRenderer::TexturesResult TexturesRenderer::applyToTerrain(double x, doub if (info->presence > 0.0) { Vector3 normal = _getDetailNormal(parent, terrain.location, terrain.normal, info->layer); - info->color = parent->applyLightingToSurface(terrain.location, normal, *info->layer->material); + Vector3 location(x, terrain.location.y, z); + info->color = parent->applyLightingToSurface(location, normal, *info->layer->material); } else {