Minor fixes to LoD merging

This commit is contained in:
Joshua Barretto 2020-02-21 16:15:13 +00:00
parent 7b42aebd70
commit 58587b6854
3 changed files with 2 additions and 3 deletions

View File

@ -33,7 +33,6 @@ void main() {
f_pos = ( f_pos = (
combined_mat * combined_mat *
vec4(v_pos, 1)).xyz; 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; f_col = v_col;

View File

@ -8,7 +8,7 @@ vec2 pos_to_uv(vec2 pos) {
} }
float alt_at(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 return 0.0
+ pow(texture(t_noise, pos * 0.00005).x * 1.4, 3.0) * 1000.0 + pow(texture(t_noise, pos * 0.00005).x * 1.4, 3.0) * 1000.0

View File

@ -17,7 +17,7 @@ out float f_light;
void main() { void main() {
f_pos = lod_pos(v_pos + vec2(0, -v_pos.x * 0.5)); 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; f_light = 1.0;