mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Don't have rain be behind an expiremental shader
This commit is contained in:
parent
6274d54e56
commit
b82bb5b247
@ -99,7 +99,6 @@ void main() {
|
|||||||
color.rgb = apply_point_glow(cam_pos.xyz + focus_off.xyz, dir, dist, color.rgb);
|
color.rgb = apply_point_glow(cam_pos.xyz + focus_off.xyz, dir, dist, color.rgb);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_RAIN
|
|
||||||
vec3 old_color = color.rgb;
|
vec3 old_color = color.rgb;
|
||||||
|
|
||||||
// If this value is changed also change it in common/src/weather.rs
|
// If this value is changed also change it in common/src/weather.rs
|
||||||
@ -151,7 +150,6 @@ void main() {
|
|||||||
float light = sqrt(dot(old_color, vec3(1))) + (get_sun_brightness() + get_moon_brightness()) * 0.01;
|
float light = sqrt(dot(old_color, vec3(1))) + (get_sun_brightness() + get_moon_brightness()) * 0.01;
|
||||||
color.rgb = mix(color.rgb, vec3(0.3, 0.4, 0.5) * light, mix(avg_alpha, alpha, min(1000 / dist_to_rain, 1)) * 0.25);
|
color.rgb = mix(color.rgb, vec3(0.3, 0.4, 0.5) * light, mix(avg_alpha, alpha, min(1000 / dist_to_rain, 1)) * 0.25);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
tgt_color = vec4(color.rgb, 1);
|
tgt_color = vec4(color.rgb, 1);
|
||||||
}
|
}
|
||||||
|
@ -149,7 +149,6 @@ void main() {
|
|||||||
wave_sample_dist / slope
|
wave_sample_dist / slope
|
||||||
);
|
);
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_RAIN
|
|
||||||
float rain_density = rain_density_at(f_pos.xy + focus_off.xy) * rain_occlusion_at(f_pos.xyz) * 50.0;
|
float rain_density = rain_density_at(f_pos.xy + focus_off.xy) * rain_occlusion_at(f_pos.xyz) * 50.0;
|
||||||
if (rain_density > 0 && surf_norm.z > 0.5) {
|
if (rain_density > 0 && surf_norm.z > 0.5) {
|
||||||
vec3 drop_density = vec3(2, 2, 2);
|
vec3 drop_density = vec3(2, 2, 2);
|
||||||
@ -172,7 +171,6 @@ void main() {
|
|||||||
* max(drop_pos.z - near_cell.z, 0);
|
* max(drop_pos.z - near_cell.z, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
nmap = mix(f_norm, normalize(nmap), min(1.0 / pow(frag_dist, 0.75), 1));
|
nmap = mix(f_norm, normalize(nmap), min(1.0 / pow(frag_dist, 0.75), 1));
|
||||||
|
|
||||||
|
@ -231,7 +231,6 @@ void main() {
|
|||||||
vec3 k_d = vec3(1.0);
|
vec3 k_d = vec3(1.0);
|
||||||
vec3 k_s = vec3(R_s);
|
vec3 k_s = vec3(R_s);
|
||||||
|
|
||||||
#ifdef EXPERIMENTAL_RAIN
|
|
||||||
vec3 pos = f_pos + focus_off.xyz;
|
vec3 pos = f_pos + focus_off.xyz;
|
||||||
float rain_density = rain_density_at(pos.xy) * rain_occlusion_at(f_pos.xyz) * 50.0;
|
float rain_density = rain_density_at(pos.xy) * rain_occlusion_at(f_pos.xyz) * 50.0;
|
||||||
// Toggle to see rain_occlusion
|
// Toggle to see rain_occlusion
|
||||||
@ -263,7 +262,6 @@ void main() {
|
|||||||
* max(drop_pos.z - near_cell.z, 0);
|
* max(drop_pos.z - near_cell.z, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
// float sun_light = get_sun_brightness(sun_dir);
|
// float sun_light = get_sun_brightness(sun_dir);
|
||||||
// float moon_light = get_moon_brightness(moon_dir);
|
// float moon_light = get_moon_brightness(moon_dir);
|
||||||
|
@ -6,8 +6,6 @@ use noise::{NoiseFn, SuperSimplex, Turbulence};
|
|||||||
use vek::*;
|
use vek::*;
|
||||||
use world::World;
|
use world::World;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
#[derive(Clone, Copy, Default)]
|
#[derive(Clone, Copy, Default)]
|
||||||
struct Cell {
|
struct Cell {
|
||||||
|
@ -360,7 +360,9 @@ impl AudioFrontend {
|
|||||||
channel_tag: AmbientChannelTag,
|
channel_tag: AmbientChannelTag,
|
||||||
) -> Option<&mut AmbientChannel> {
|
) -> Option<&mut AmbientChannel> {
|
||||||
if self.audio_stream.is_some() {
|
if self.audio_stream.is_some() {
|
||||||
self.ambient_channels.iter_mut().find(|channel| channel.get_tag() == channel_tag)
|
self.ambient_channels
|
||||||
|
.iter_mut()
|
||||||
|
.find(|channel| channel.get_tag() == channel_tag)
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
@ -476,8 +476,6 @@ pub enum ExperimentalShader {
|
|||||||
/// Display grid lines to visualize the distribution of shadow map texels
|
/// Display grid lines to visualize the distribution of shadow map texels
|
||||||
/// for the directional light from the sun.
|
/// for the directional light from the sun.
|
||||||
DirectionalShadowMapTexelGrid,
|
DirectionalShadowMapTexelGrid,
|
||||||
/// Enable rain, unfinished and goes through blocks
|
|
||||||
Rain,
|
|
||||||
/// Enable rainbows
|
/// Enable rainbows
|
||||||
Rainbows,
|
Rainbows,
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user