Skip to content
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

Closed
maurrubio opened this issue Mar 27, 2014 · 5 comments
Closed

Intensity with GPUImageLookupFilter #1485

maurrubio opened this issue Mar 27, 2014 · 5 comments

Comments

@maurrubio
Copy link

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.

@travisweerts
Copy link

What I would recommend is learning to make your own custom filter and shader that does this, it's really not too difficult.

@maurrubio
Copy link
Author

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?

@Lotogram
Copy link

Lotogram commented Apr 5, 2014

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.

@maurrubio
Copy link
Author

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.

@Lotogram
Copy link

Lotogram commented Apr 7, 2014

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 notifications@github.com wrote:

Closed #1485 #1485.

Reply to this email directly or view it on GitHubhttps://github.com//issues/1485
.

Best Regards,

Shawn | Support Team | Lotogram Technology LLC,.

DISCOVER THE LIFE OF PHOTO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants