From 502145a6f949bdc971b5adbd93c7bfe07454c6a5 Mon Sep 17 00:00:00 2001 From: Joshua Barretto Date: Sun, 13 Mar 2022 20:40:33 +0000 Subject: [PATCH] Cloud movement is more prominent --- assets/voxygen/shaders/clouds-frag.glsl | 4 ++-- assets/voxygen/shaders/fluid-frag/shiny.glsl | 2 +- assets/voxygen/shaders/terrain-frag.glsl | 2 +- server/src/weather/sim.rs | 11 +++++++---- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/assets/voxygen/shaders/clouds-frag.glsl b/assets/voxygen/shaders/clouds-frag.glsl index 655249cc3f..eab938f7b5 100644 --- a/assets/voxygen/shaders/clouds-frag.glsl +++ b/assets/voxygen/shaders/clouds-frag.glsl @@ -112,7 +112,7 @@ void main() { vec2 view_pos = vec2(atan2(dir_2d.x, dir_2d.y), z); vec3 cam_wpos = cam_pos.xyz + focus_off.xyz; - float rain_density = rain_density_at(cam_wpos.xy) * 100.0; + float rain_density = rain_density_at(cam_wpos.xy) * 10.0; if (rain_density > 0) { float rain_dist = 50.0; for (int i = 0; i < 5; i ++) { @@ -125,7 +125,7 @@ void main() { continue; } - float drop_density = 3; + vec2 drop_density = vec2(30, 3); vec2 drop_size = vec2(0.0015, 0.17); vec2 rain_pos = (view_pos * rain_dist); diff --git a/assets/voxygen/shaders/fluid-frag/shiny.glsl b/assets/voxygen/shaders/fluid-frag/shiny.glsl index bb57834e44..e01e2982bf 100644 --- a/assets/voxygen/shaders/fluid-frag/shiny.glsl +++ b/assets/voxygen/shaders/fluid-frag/shiny.glsl @@ -152,7 +152,7 @@ void main() { #ifdef EXPERIMENTAL_RAIN float rain_density = rain_density_at(cam_pos.xy + focus_off.xy) * 100.0; if (rain_density > 0 && surf_norm.z > 0.5) { - vec3 drop_density = vec3(2, 2, 1); + vec3 drop_density = vec3(2, 2, 2); vec3 drop_pos = wave_pos + vec3(0, 0, -time_of_day.x * 0.025); drop_pos.z += noise_2d(floor(drop_pos.xy * drop_density.xy) * 13.1) * 10; vec2 cell2d = floor(drop_pos.xy * drop_density.xy); diff --git a/assets/voxygen/shaders/terrain-frag.glsl b/assets/voxygen/shaders/terrain-frag.glsl index 8772554671..168883728f 100644 --- a/assets/voxygen/shaders/terrain-frag.glsl +++ b/assets/voxygen/shaders/terrain-frag.glsl @@ -235,7 +235,7 @@ void main() { float rain_density = rain_density_at(cam_pos.xy + focus_off.xy) * 100.0; if (rain_density > 0 && !faces_fluid && f_norm.z > 0.5) { vec3 pos = f_pos + focus_off.xyz; - vec3 drop_density = vec3(2, 2, 1); + vec3 drop_density = vec3(2, 2, 2); vec3 drop_pos = pos + vec3(pos.zz, 0) + vec3(0, 0, -tick.x * 1.0); drop_pos.z += noise_2d(floor(drop_pos.xy * drop_density.xy) * 13.1) * 10; vec2 cell2d = floor(drop_pos.xy * drop_density.xy); diff --git a/server/src/weather/sim.rs b/server/src/weather/sim.rs index fbc00e0457..671da19498 100644 --- a/server/src/weather/sim.rs +++ b/server/src/weather/sim.rs @@ -176,9 +176,11 @@ impl WeatherSim { for (point, cell) in self.weather.iter_mut() { let wpos = cell_to_wpos(point); - let space_scale = 7500.0; - let time_scale = 25000.0; - let spos = (wpos.as_::() / space_scale).with_z(time as f64 / time_scale); + let pos = wpos.as_::() + time as f64 * 0.25; + + let space_scale = 7_500.0; + let time_scale = 100_000.0; + let spos = (pos / space_scale).with_z(time as f64 / time_scale); let pressure = (base_nz.get(spos.into_array()) * 0.5 + 1.0).clamped(0.0, 1.0) as f32; @@ -187,7 +189,8 @@ impl WeatherSim { cell.wind = Vec2::new( rain_nz.get(spos.into_array()) as f32, rain_nz.get((spos + 1.0).into_array()) as f32, - ) * 250.0 * (1.0 - pressure); + ) * 250.0 + * (1.0 - pressure); } /* let mut swap = Grid::new(self.cells.size(), Cell::default());