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

associative alpha #49

Merged
merged 1 commit into from
Dec 3, 2024
Merged

associative alpha #49

merged 1 commit into from
Dec 3, 2024

Conversation

awalterschulze
Copy link
Collaborator

@awalterschulze awalterschulze commented Dec 3, 2024

In this blog post https://ciechanow.ski/alpha-compositing/#compositing-done-right we found that alpha composting or blending is associative via the formula

R = S + D × (1 − S_a)
where
R = result
S = source
D = destination

This commit updates the alpha blending formula to match the formula found in the blog post that is associative and proves it.

This also updates batteries to v4.14.0 and adds mathlib v4.14.0 as a dependency. This way we can import mathlib for the linarith tactic that is useful for proving that alpha blending is associcative.

We also update the screen size for image denotation so we can see the FPS

Screenshot 2024-12-03 at 15 26 37

This updates the alpha blending formula to match a formula found in a blog post that is associative and proves it.

This also updates batteries to v4.14.0 and adds mathlib v4.14.0 as a dependency.
This way we can import mathlib for the linarith tactic that is useful for proving that alpha blending is associcative.

We also update the screen size for image denotation so we can see the FPS
Copy link
Owner

@paulcadman paulcadman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🌟

@paulcadman paulcadman merged commit 081b6e9 into main Dec 3, 2024
2 checks passed
@awalterschulze awalterschulze deleted the associative_alpha branch December 4, 2024 20:06
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.

2 participants