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

HighlightShadowTintFilter does not work #33

Closed
c060604 opened this issue Jun 12, 2016 · 5 comments
Closed

HighlightShadowTintFilter does not work #33

c060604 opened this issue Jun 12, 2016 · 5 comments

Comments

@c060604
Copy link

c060604 commented Jun 12, 2016

I use the HighlightAndShadowTint filter and change value of the shadowTintIntensity property, but nothing happen.

`

override func loadView() {
    super.loadView()

    picture = PictureInput(image: UIImage(named: "WID-small.jpg")!)
    filter = HighlightAndShadowTint()
    picture --> filter --> renderView
    picture.processImage()
}

@IBAction func updateValue(sender: AnyObject) {
    filter.shadowTintIntensity = shadowIntensitySlider.value
    picture.processImage()

    print(filter.shadowTintIntensity)
}

`

@BradLarson
Copy link
Owner

It looks like there were an incorrect number of color components in the shader on the iOS side. This should be fixed in the latest commit.

@c060604
Copy link
Author

c060604 commented Jun 13, 2016

Thank you. I found that the other properties do not work except the highlightTintIntensity property.

@BradLarson
Copy link
Owner

Is this true even with the code I committed today?

@c060604
Copy link
Author

c060604 commented Jun 13, 2016

Good! I pull the newest code and it works.

HighlightShadowTint_GLES.fsh
uniform highp vec3 shadowTintColor; uniform highp vec3 highlightTintColor;

Now the type of shadowTintColor property is vec3. Can I change the alpha value?

@BradLarson
Copy link
Owner

Not in the current code, which uses just the RGB components for performance. If it's important enough that this be done, the shader and matching filter could be modified to use the full four color components, but I've not done that by default in color inputs to make things faster in the majority of cases.

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

2 participants