Open ShayDavidson opened 11 years ago
I have the same problem. i've changed the alpha value but seems not work after blend with other pics
Try changing the line
gl_FragColor = overlayer * base + overlayer * (1.0 - base.a) + base * (1.0 - overlayer.a);
to
gl_FragColor = (overlayer * base.a) * (base * overlayer.a) + overlayer * (1.0 - base.a) + base * (1.0 - overlayer.a);
in GPUImageMultiplyBlendFilter.m and see if that makes things better. If so, I can tweak the shaders in the framework.
This fixes the issue for me - i'd love for this to be implemented on the other shaders too if possible. Many thanks.
If there is anyone out there that is able to help with this (Brad?). I have some budget for a paid solution (that can be added to the open source project if Brad wants it)
I'm trying to create filter which uses a Multiply blend filter with an image output and a color layer with a certain alpha ('translated' to Photoshop, imagine I have a single-colored layer at X% opacity, set to Multiply blend mode on top of another layer).
I'm using this code:
The problem was that the multiply effect with the color is too bright or saturated. So I played a bit with the alpha, and found out that even if
COLOR_ALPHA
is0.0f
the output still gets colored a tiny bit and hence the brightness I saw earlier.Notice I'm using the initial output itself as a source for the single color filter (so its output will be at the same size of the initial output).
I'm probably doing something wrong and there's a better way to achieve this, but I can't find any.