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 blending states #8202

Merged
merged 2 commits into from
Sep 23, 2019
Merged

Fix blending states #8202

merged 2 commits into from
Sep 23, 2019

Conversation

lilleyse
Copy link
Contributor

The blending equation for the alpha channel was incorrect in master. It would end up doing
srcAlpha * srcAlpha + dstAlpha * (1.0 - srcAlpha)

After the fix the equation is srcAlpha * 1.0 + dstAlpha * (1.0 - srcAlpha)

Also fixed ADDITIVE_BLEND which had the same problem.

Noticed while working on #4381. I guess it never came up before because we never alpha blend a framebuffer onto another framebuffer.

@cesium-concierge
Copy link

Thanks for the pull request @lilleyse!

  • ✔️ Signed CLA found.
  • ❔ Unit tests were not updated.
    • Make sure you've updated tests to reflect your changes, added tests for any new code, and ran the code coverage tool.

Reviewers, don't forget to make sure that:

  • Cesium Viewer works.
  • Works in 2D/CV.
  • Works (or fails gracefully) in IE11.

@IanLilleyT
Copy link
Contributor

Looks good @lilleyse

@IanLilleyT IanLilleyT closed this Sep 23, 2019
@IanLilleyT IanLilleyT reopened this Sep 23, 2019
@IanLilleyT IanLilleyT merged commit bba1c5d into master Sep 23, 2019
@IanLilleyT IanLilleyT deleted the fix-blending-state branch September 23, 2019 19:51
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