I have managed to solve it. For proof:
That means, Krita would have a very flexible gradient manipulation tool. With this, I can do a lot with gradient.
Next up, I think I will create Modulo Shift and take a break. I’m really liking this. The modulo blending modes are just too good for gradient mapping manipulation. I can say that I can officially shift gradient map now.
EDIT: I am now down to 1 blending mode to go for Krita! I’ll edit this post back if I managed to do flatlight. Then, I will release those modes to krita phabricator. LCH Blending Modes and filters are something I want to do, but Krita codebase at the moment doesn’t permit that for now. I have finished all the essential modulo blending modes for abstract art, and glitch art, and gradient map manipulation.
There are some IMBLEND mode that are actually way better than the standard overlay, dodge, and so on. Easy Burn, and Easy Dodge for example are superior to Dodge, and Burn in every single way. They’re smooth, don’t add up to one, retain the property of dodge and burn with the difference that they’re smoothed uniformly. Some mode like Super Light is better than their related blending mode, but the issue is that they’re better in either linear space or non-linear space. Super Light beats Hard Light on linear color space. I would argue that some quadratic modes are way better on linear space than overlay and some few lighting mode too.
EDIT: Aw, flatlight is looking way too hard to make. I suppose I do have a workaround to this difficulty. Make up my own expression, and make my own varient of flatlight. I don’t think it should be hard to make. I can certainly do it with one of the dodge varient. But, I suspect it probably won’t turn out too well, but not sure about that. Logarithmic Dodge modes do have some similarity with flatlight, so I can use those mode to mimic flatlight with hardmix conditions.
@DGM Any advice on flatlight mode?
I’m experimenting with layermode.exe, and I find that one section is very similar to (0.5*512)*a/(255-b) assuming the end result determines 8-bit output. If I do a section where inverted hardmix mode, and regular hardmix mode mix, it is simply restricted to the intersection of the hard mix mode, but swapping layers, and inverting. This should lead me to something very similar to flatlight without being flatlight.
Hmm, mixing softdodge, and softburn mode with hardmix conditions would do the trick. I looked at the contour plot, and it seem like the solution. I shall check. My solution works just fine for linear space. Non-linear space, not so much, but well, it is what it is.
I’ll release the patch now.