Skip to content

Adds precision argument to chroma effect#141

Open
javl wants to merge 1 commit intobrianchirls:masterfrom
javl:patch-1
Open

Adds precision argument to chroma effect#141
javl wants to merge 1 commit intobrianchirls:masterfrom
javl:patch-1

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