aec72c0a9ae5e4e72c35a7a48af684eb0d9722ca
Numerical instability mainly comes from adding values together which have very different magnitude. There are algorithms to keep the error small like "Kahan Summation", however those are also slower because of additional code in the hot loop. This patch implements a simpler approach that is slightly less accurate, but still seems to solve the cases that people commonly run into while being simpler and faster. The approach is to simply compute a couple partial sums first, and to add those up in the end. The individual partial sums can also be computed in parallel. Care has to be taken to maintain determinism with floating point values. If accuracy is still not enough for some use cases, we can revisit this later and e.g. use doubles or a better summation algorithm. Pull Request: https://projects.blender.org/blender/blender/pulls/132759
…
Blender
Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.
Project Pages
Development
License
Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different, but compatible license.
See blender.org/about/license for details.
Description
Languages
C++
78%
Python
14.9%
C
2.9%
GLSL
1.9%
CMake
1.2%
Other
0.9%
