Balanced rain intensity

This commit is contained in:
Joshua Barretto 2022-07-08 20:22:09 +01:00
parent 6c4b10d881
commit 4b738c8b8f
2 changed files with 2 additions and 2 deletions

View File

@ -109,7 +109,7 @@ void main() {
float wpos_dist = t - jump * depth_adjust;
vec3 wpos = cam_pos.xyz + dir * wpos_dist;
float density = rain_density * 3.0 * rain_occlusion_at(wpos);
float density = rain_density * rain_occlusion_at(wpos);
if (density < 0.001 || fract(hash(vec4(floor(wall_pos.xyz), 0))) > density) { continue; }
if (wpos_dist > dist) { break; }

View File

@ -244,7 +244,7 @@ void main() {
drop_pos.z *= 0.5 + hash_fast(uvec3(cell2d, 0));
vec3 cell = vec3(cell2d, floor(drop_pos.z * drop_density.z));
if (fract(hash(fract(vec4(cell, 0) * 0.01))) < rain_density * rain_occlusion_at(f_pos.xyz) * 10.0) {
if (fract(hash(fract(vec4(cell, 0) * 0.01))) < rain_density * rain_occlusion_at(f_pos.xyz) * 2.0) {
vec3 off = vec3(hash_fast(uvec3(cell * 13)), hash_fast(uvec3(cell * 5)), 0);
vec3 near_cell = (cell + 0.5 + (off - 0.5) * 0.5) / drop_density;