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

Fix alpha coverage for images of single width/height #45

Merged
merged 2 commits into from
Feb 20, 2024

Conversation

Athosvk
Copy link
Contributor

@Athosvk Athosvk commented Feb 20, 2024

The previous coverage returned for 1x1 images was incorrect and should have checked its alpha instead, but I noticed that this was wrong for any single column or row case (i.e. size 1 x n or n x 1), due to the use of subsampling. This would make the alpha coverage accumulation always result in zero and trigger a division by zero right after.

This change makes it so that single row or column images simply don't use the subsampling pattern, as it's likely not sound to do the subsampling in only one dimension.

@Athosvk Athosvk merged commit 0544a3a into main Feb 20, 2024
10 checks passed
@MarijnS95 MarijnS95 deleted the fix-alpha-coverage-single-width branch March 5, 2024 21:49
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