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);
|
||||
#endif
|
||||
|
||||
#ifdef EXPERIMENTAL_RAIN
|
||||
vec3 old_color = color.rgb;
|
||||
|
||||
// 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;
|
||||
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);
|
||||
}
|
||||
|
@ -149,7 +149,6 @@ void main() {
|
||||
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;
|
||||
if (rain_density > 0 && surf_norm.z > 0.5) {
|
||||
vec3 drop_density = vec3(2, 2, 2);
|
||||
@ -172,7 +171,6 @@ void main() {
|
||||
* max(drop_pos.z - near_cell.z, 0);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
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_s = vec3(R_s);
|
||||
|
||||
#ifdef EXPERIMENTAL_RAIN
|
||||
vec3 pos = f_pos + focus_off.xyz;
|
||||
float rain_density = rain_density_at(pos.xy) * rain_occlusion_at(f_pos.xyz) * 50.0;
|
||||
// Toggle to see rain_occlusion
|
||||
@ -263,7 +262,6 @@ void main() {
|
||||
* max(drop_pos.z - near_cell.z, 0);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// float sun_light = get_sun_brightness(sun_dir);
|
||||
// float moon_light = get_moon_brightness(moon_dir);
|
||||
|
@ -6,8 +6,6 @@ use noise::{NoiseFn, SuperSimplex, Turbulence};
|
||||
use vek::*;
|
||||
use world::World;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
#[derive(Clone, Copy, Default)]
|
||||
struct Cell {
|
||||
|
@ -360,7 +360,9 @@ impl AudioFrontend {
|
||||
channel_tag: AmbientChannelTag,
|
||||
) -> Option<&mut AmbientChannel> {
|
||||
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 {
|
||||
None
|
||||
}
|
||||
|
@ -476,8 +476,6 @@ pub enum ExperimentalShader {
|
||||
/// Display grid lines to visualize the distribution of shadow map texels
|
||||
/// for the directional light from the sun.
|
||||
DirectionalShadowMapTexelGrid,
|
||||
/// Enable rain, unfinished and goes through blocks
|
||||
Rain,
|
||||
/// Enable rainbows
|
||||
Rainbows,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user