Fix: EEVEE-Next: Another uninitialized variable in volume probe loading

The spherical_harmonics_triple_product was not working as
expected and produced NaNs.

Cleanup to avoid more confusion.
This commit is contained in:
Clément Foucault
2024-02-13 19:05:15 +01:00
parent 13f0d7bd47
commit 88228a84d1

View File

@@ -375,12 +375,11 @@ SphericalHarmonicL1 spherical_harmonics_triple_product(SphericalHarmonicL1 a,
vec4 tb = 0.282094791 * b.L0.M0;
sh.L1.Mn1 = ta * b.L1.Mn1 + tb * a.L1.Mn1;
sh.L0.M0 += 0.282094791 * (a.L1.Mn1 * b.L1.Mn1);
sh.L1.M0 += ta * b.L1.M0 + tb * a.L1.M0;
sh.L0.M0 += 0.282094795 * (a.L1.M0 * b.L1.M0);
sh.L1.M0 = ta * b.L1.M0 + tb * a.L1.M0;
sh.L1.Mp1 = ta * b.L1.Mp1 + tb * a.L1.Mp1;
sh.L0.M0 += 0.282094791 * (a.L1.Mn1 * b.L1.Mn1);
sh.L0.M0 += 0.282094795 * (a.L1.M0 * b.L1.M0);
sh.L0.M0 += 0.282094791 * (a.L1.Mp1 * b.L1.Mp1);
return sh;
}