mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Minimised rain occlusion problems
This commit is contained in:
parent
b08a501aef
commit
ea39f78dfd
@ -114,7 +114,7 @@ void main() {
|
||||
|
||||
if (wpos_dist > dist) { break; }
|
||||
if (length((fract(wall_pos.xz) - 0.5)) < 0.1 + pow(max(0.0, wpos_dist - (dist - 0.25)) / 0.25, 4.0) * 0.2) {
|
||||
float density = rain_density * rain_occlusion_at(wpos - vec3(0, 0, 0.5));
|
||||
float density = rain_density * rain_occlusion_at(wpos);
|
||||
if (fract(hash_two(uvec2(wall_pos.xz) + 1000u)) >= density) { continue; }
|
||||
|
||||
float alpha = 0.5 * clamp((wpos_dist - 1.0) * 0.5, 0.0, 1.0);
|
||||
|
@ -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 (rain_occlusion_at(f_pos.xyz) > 0.5) {
|
||||
if (rain_occlusion_at(f_pos.xyz + vec3(0, 0, 0.25)) > 0.5) {
|
||||
#ifdef EXPERIMENTAL_WETNESS
|
||||
float puddle = clamp((noise_2d((f_pos.xy + focus_off.xy + vec2(0.1, 0)) * 0.03) - 0.5) * 20.0, 0.0, 1.0) * min(rain_density * 10.0, 1.0);
|
||||
#else
|
||||
|
@ -195,7 +195,7 @@ impl RainOcclusionPipeline {
|
||||
topology: wgpu::PrimitiveTopology::TriangleList,
|
||||
strip_index_format: None,
|
||||
front_face: wgpu::FrontFace::Ccw,
|
||||
cull_mode: Some(wgpu::Face::Front),
|
||||
cull_mode: None,
|
||||
clamp_depth: true,
|
||||
polygon_mode: wgpu::PolygonMode::Fill,
|
||||
conservative: false,
|
||||
|
Loading…
Reference in New Issue
Block a user