diff --git a/crates/bevy_pbr/src/render/pbr_lighting.wgsl b/crates/bevy_pbr/src/render/pbr_lighting.wgsl index eb23e2e604..8d29f99773 100644 --- a/crates/bevy_pbr/src/render/pbr_lighting.wgsl +++ b/crates/bevy_pbr/src/render/pbr_lighting.wgsl @@ -357,12 +357,13 @@ fn fetch_transmissive_background(offset_position: vec2, frag_coord: vec3> 3u) + 1; + let random_angle = interleaved_gradient_noise(frag_coord.xy); var result = vec4(0.0); for (var i: i32 = 0; i < num_taps; i = i + 1) { let current_spiral = (i >> 3u); - let random_angle = f32(current_spiral) / f32(num_spirals) * 2.0 * PI + 2.0 * PI * interleaved_gradient_noise(frag_coord.xy); - let m = vec2(sin(random_angle), cos(random_angle)); + let angle = (random_angle + f32(current_spiral) / f32(num_spirals)) * 2.0 * PI; + let m = vec2(sin(angle), cos(angle)); let rotation_matrix = mat2x2( m.y, -m.x, m.x, m.y