Skip to content

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
Collaborator

@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
paulcadman added a commit that referenced this pull request Jan 15, 2025
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.

3 participants