From 58587b68545a23c5c04ab4574a4b94b3bc982246 Mon Sep 17 00:00:00 2001 From: Joshua Barretto Date: Fri, 21 Feb 2020 16:15:13 +0000 Subject: [PATCH] Minor fixes to LoD merging --- assets/voxygen/shaders/figure-vert.glsl | 1 - assets/voxygen/shaders/include/lod.glsl | 2 +- assets/voxygen/shaders/lod-terrain-vert.glsl | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/assets/voxygen/shaders/figure-vert.glsl b/assets/voxygen/shaders/figure-vert.glsl index 1bb8eeaef7..eced69e5ea 100644 --- a/assets/voxygen/shaders/figure-vert.glsl +++ b/assets/voxygen/shaders/figure-vert.glsl @@ -33,7 +33,6 @@ void main() { f_pos = ( combined_mat * vec4(v_pos, 1)).xyz; - f_pos.z -= 1.0 * pow(distance(focus_pos.xy, f_pos.xy) / (view_distance.x * 0.95), 20.0); f_col = v_col; diff --git a/assets/voxygen/shaders/include/lod.glsl b/assets/voxygen/shaders/include/lod.glsl index ff14eefea6..92984fccd0 100644 --- a/assets/voxygen/shaders/include/lod.glsl +++ b/assets/voxygen/shaders/include/lod.glsl @@ -8,7 +8,7 @@ vec2 pos_to_uv(vec2 pos) { } float alt_at(vec2 pos) { - return texture(t_map, pos_to_uv(pos)).a * (1310.0) + 140.0; + return texture(t_map, pos_to_uv(pos)).a * (1300.0) + 140.0; return 0.0 + pow(texture(t_noise, pos * 0.00005).x * 1.4, 3.0) * 1000.0 diff --git a/assets/voxygen/shaders/lod-terrain-vert.glsl b/assets/voxygen/shaders/lod-terrain-vert.glsl index 8d259b1edb..84456c45aa 100644 --- a/assets/voxygen/shaders/lod-terrain-vert.glsl +++ b/assets/voxygen/shaders/lod-terrain-vert.glsl @@ -17,7 +17,7 @@ out float f_light; void main() { f_pos = lod_pos(v_pos + vec2(0, -v_pos.x * 0.5)); - f_pos.z -= min(32.0, 1.0 / pow(distance(focus_pos.xy, f_pos.xy) / (view_distance.x * 0.95), 20.0)); + f_pos.z -= 1.0 / pow(distance(focus_pos.xy, f_pos.xy) / (view_distance.x * 0.95), 20.0); f_light = 1.0;