From 606a9704afb53c3585c6b41b86004024bf327ff2 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 10 Feb 2024 11:36:47 -0800 Subject: [PATCH] Don't do geometric reflections for the late reverb At this point, the vector all-pass is already applying a diffusion-based scattering matrix, which the geometric reflections would compound with. --- alc/effects/reverb.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/alc/effects/reverb.cpp b/alc/effects/reverb.cpp index 062d382d..f34f2afc 100644 --- a/alc/effects/reverb.cpp +++ b/alc/effects/reverb.cpp @@ -1423,8 +1423,8 @@ inline auto VectorPartialScatter(const std::array &RESTRICT in, }; } -/* Utilizes the above, but also applies a geometric reflection on the input - * channels. +/* Utilizes the above, but also applies a line-based reflection on the input + * channels (swapping 0<->3 and 1<->2). */ void VectorScatterRev(const float xCoeff, const float yCoeff, const al::span samples, const size_t count) noexcept @@ -1434,14 +1434,8 @@ void VectorScatterRev(const float xCoeff, const float yCoeff, for(size_t i{0u};i < count;++i) { std::array src{samples[0][i], samples[1][i], samples[2][i], samples[3][i]}; - const std::array f{ - (src[0] - src[1] - src[2] - src[3]) * 0.5f, - (src[1] - src[0] - src[2] - src[3]) * 0.5f, - (src[2] - src[0] - src[1] - src[3]) * 0.5f, - (src[3] - src[0] - src[1] - src[2] ) * 0.5f - }; - src = VectorPartialScatter(f, xCoeff, yCoeff); + src = VectorPartialScatter(std::array{src[3], src[2], src[1], src[0]}, xCoeff, yCoeff); samples[0][i] = src[0]; samples[1][i] = src[1]; samples[2][i] = src[2]; -- 2.11.4.GIT