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

Adds precision argument to chroma effect #141

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Adds precision argument to chroma effect #141

wants to merge 1 commit into from

Conversation

javl
Copy link

@javl javl commented Jan 16, 2017

As mentioned in issue #80 some devices will add black areas when using chroma due to problems when rounding the alpha value. This pull request adds a precision argument to the chroma effect to easily change the rounding factor to fit specific devices.

The default value is the original 0.00001 so this shouldn't break anything for existing scripts.
For example: on the iPad 2 with Safari 9, iOS 9.3 I had to change the precision to 0.01 for the chroma effect to work reliably.

chroma = seriously.effect('chroma');
chroma.precision = 0.01;

As mentioned in issue 80 some devices will add black areas when using chroma due to problems when rounding the alpha value. This pull request adds a precision argument to the chroma effect to easily change the rounding factor to fit specific devices:

For example: on the iPad 2 with Safari 9, iOS 9.3 I had to change the precision to 0.01 for the chroma effect to work reliably.
The default value is the original 0.00001 so this shouldn't break anything for existing scripts.

    		chroma = seriously.effect('chroma');
		chroma.precision = 0.01;
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

Successfully merging this pull request may close these issues.

1 participant