From 13f59bfcbb7be565d8c0b7f91c8d749cbcd26484 Mon Sep 17 00:00:00 2001 From: Marco Buono Date: Fri, 10 Mar 2023 03:13:00 -0300 Subject: [PATCH] Make number of taps increase faster with perceptual roughness --- crates/bevy_pbr/src/render/pbr_lighting.wgsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_pbr/src/render/pbr_lighting.wgsl b/crates/bevy_pbr/src/render/pbr_lighting.wgsl index e0d7991bf8..dfca45e3ad 100644 --- a/crates/bevy_pbr/src/render/pbr_lighting.wgsl +++ b/crates/bevy_pbr/src/render/pbr_lighting.wgsl @@ -314,7 +314,7 @@ fn transmissive_light(frag_coord: vec3, N: vec3, V: vec3, ior: f3 fn fetch_transmissive_background(offset_position: vec2, frag_coord: vec3, aspect: f32, perceptual_roughness: f32) -> vec3 { // Number of taps scale with perceptual roughness // Minimum: 1, Maximum: 9 - let num_taps = i32(max(perceptual_roughness * 40.0, 8.0)) + 1; + let num_taps = i32(max(perceptual_roughness * 80.0, 8.0)) + 1; var result = vec3(0.0, 0.0, 0.0); for (var i: i32 = 0; i < num_taps; i = i + 1) { // Magic numbers have been empirically chosen to produce blurry results that look “smooth”