Intensity with GPUImageLookupFilter
Hello, it would be possible to add a intensity variable in the GPUImageLookupFilter?
The idea is control how much of the end image will have the lookup filter applied. Alternatively if someone can help me to setup a code that uses the Alpha filter to mix the original image and the filtered image it would be great.
What I would recommend is learning to make your own custom filter and shader that does this, it's really not too difficult.
I tried to do it looking into the GL shader of the GPUImageLookupFilter code but I couldn't figure out how to apply the alpha channel only on the first texture image, could someone help me to progress further?
gl_FragColor = mix(textureColor, vec4(vec3(newColor),1.0), mixTexture);
the "textureColor" is the original texture, and "newColor" is the LookupFilter result, and mixTexture is the Alpha value which is (0 ~ 1.0), you can think it as intensity variable.
Thank you very much @Lotogram it worked well.
Maybe someone should consider to commit this setting to the main branch? I think it's quite useful.
Regards.
I think this is a basic shader, and developers could add any filters as they like. Only need to learn more shader language. :-)
The GREAT GUPImage which Brad created, is the open platform which has possibility to add any effect/filter/function you can image it.
Thanks Brad for his GUPImage!
On Sat, Apr 5, 2014 at 12:43 PM, maurrubio [email protected] wrote:
Closed #1485 https://github.com/BradLarson/GPUImage/issues/1485.
Reply to this email directly or view it on GitHubhttps://github.com/BradLarson/GPUImage/issues/1485 .
Best Regards,
Shawn | Support Team | Lotogram Technology LLC,.
DISCOVER THE LIFE OF PHOTO.