Gimp layer mode Addition calculates vector magnitude instead
GIMP version: 2.10.2
Operating System: Windows 10 x64
Package: normal Gimp installer for Windows
Description of the bug
The Addition layer mode is instead calculating vector magnitude, treating each layer as a component of a vector. So for example the R channel pixel 0,0 of layer 1 is treated the one component of the vector. Then channel R of pixel 0,0 of layer 2 is treated as the other component vector, and then the output is calculated by output = sqrt(value1^2 + value2^2)
Reproduction
Reproduction steps:
- take a horizontal gradient on one layer and a vertical gradient on another layer
- set the mode of the upper layer to Addition
- notice the quarter-circular shaped gradient in the output
Expected result: output = value1 + value2
Actual result: output = sqrt(value1^2 + value2^2)