Some blend modes appear to produce in some condition strange results in some gradients. It was tested with 32 float, but some cases where verified in 16 bits integer. A image was posted, it will probably be quite visible with divide, or parallel or vivid Light, among others. Reproducible: Always
Created attachment 94722 [details] Image where pattern can be seen and tested, appears to be an overflow
Yes, it looks like the gradients managed to generate negative colors...
Steps to reproduce: 1) Create a RGBAF32 image with g10 color profile 2) Create a gradient Red-Green-Blue 3) Draw this gradient 4) Convert to LabAF32 5) Convert back to RGBAF32 Now some of the pixels have negative values (near zero point).
Git commit e488caa31049bfff784f57fa79903df07e02aa1f by Dmitry Kazakov. Committed on 28/08/2020 at 21:14. Pushed by dkazakov into branch 'krita/4.3'. Fix Divide, Vivid Light and Parallel blending modes handle negative layer colors Sometimes, when converting RGBAF32<->LabAF32 colorspaces, LCMS may generate pixels with "slightly negative" values, like -1e-7. The mentioned blending modes couldn't handle that correclty, because they only checked for zero'ness. Now before doing a division operation we: 1) check if the value isn't too small 2) check it the value is positive NOTE: there are still a lot of blendign modes from "Binary" section that still don't handle that correctly. But, speaking truly, I don't think we should actually enable these blending modes for F32 color spaces :) M +23 -0 libs/pigment/KoColorSpaceMaths.h M +11 -11 libs/pigment/compositeops/KoCompositeOpFunctions.h https://invent.kde.org/graphics/krita/commit/e488caa31049bfff784f57fa79903df07e02aa1f
Git commit 8f4494412e5e791f1426bcc2f9d3dc73ed12d5e2 by Dmitry Kazakov. Committed on 28/08/2020 at 21:15. Pushed by dkazakov into branch 'master'. Fix Divide, Vivid Light and Parallel blending modes handle negative layer colors Sometimes, when converting RGBAF32<->LabAF32 colorspaces, LCMS may generate pixels with "slightly negative" values, like -1e-7. The mentioned blending modes couldn't handle that correclty, because they only checked for zero'ness. Now before doing a division operation we: 1) check if the value isn't too small 2) check it the value is positive NOTE: there are still a lot of blendign modes from "Binary" section that still don't handle that correctly. But, speaking truly, I don't think we should actually enable these blending modes for F32 color spaces :) M +23 -0 libs/pigment/KoColorSpaceMaths.h M +11 -11 libs/pigment/compositeops/KoCompositeOpFunctions.h https://invent.kde.org/graphics/krita/commit/8f4494412e5e791f1426bcc2f9d3dc73ed12d5e2