-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Intensity with GPUImageLookupFilter #1485
Comments
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 The GREAT GUPImage which Brad created, is the open platform which has Thanks Brad for his GUPImage! On Sat, Apr 5, 2014 at 12:43 PM, maurrubio notifications@github.com wrote:
Best Regards,
|
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.
The text was updated successfully, but these errors were encountered: