Skip to content

Conversation

@sunag
Copy link
Collaborator

@sunag sunag commented Mar 23, 2022

Description

Fix alert:
image

This contribution is funded by Google via Igalia.

@mrdoob mrdoob added this to the r139 milestone Mar 23, 2022
@mrdoob mrdoob merged commit 55f9850 into mrdoob:dev Mar 23, 2022
@mrdoob
Copy link
Owner

mrdoob commented Mar 23, 2022

Thanks!

@sunag sunag deleted the dev-compositingAlphaMode branch March 24, 2022 05:35
@WestLangley
Copy link
Collaborator

I think compositingAlphaMode: 'premultiplied' is the correct choice.

We should have a test case with a CSS background color. I'm thinking clearAlpha should default to zero, too.

@mrdoob
Copy link
Owner

mrdoob commented Mar 26, 2022

@Kangz What do you recommend?

@Kangz
Copy link

Kangz commented Mar 27, 2022

I'm not 100% sure. I think compositingAlphaMode: 'premultiplied' is more efficient on macOS but I don't know about other OSes, and if that behavior is what Three would want.

@WestLangley
Copy link
Collaborator

The reasons to set 'premultiplied' are:

  1. with opaque, a transparent background is not possible, and
  2. the NormalBlending function assumes the drawing buffer is premultiplied.

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.

4 participants