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

Premultiplied alpha #5

Open
vorg opened this issue May 4, 2015 · 1 comment
Open

Premultiplied alpha #5

vorg opened this issue May 4, 2015 · 1 comment

Comments

@vorg
Copy link
Member

vorg commented May 4, 2015

We should have one official way
http://webglfundamentals.org/webgl/lessons/webgl-and-alpha.html

Related issue in Plask
deanm/plask#37

Similar issue in ThreeJS
mrdoob/three.js#1074

@deanm
Copy link

deanm commented May 4, 2015

From my experience I can tell you to use premultiplied alpha, it is almost always better and I believe the browsers will be usually using it internally anyway. So just pixelStorei(UNPACK_PREMULTIPLY_ALPHA_WEBGL, 1)

You can see the WebKit/Blink code here, an HTMLCanvas element is premultiplied, but apparently video tag frames are not.

https://chromium.googlesource.com/chromium/blink/+/8ae4164b18cdd43aeb23f4046b95006243a12474/Source/platform/graphics/gpu/WebGLImageConversion.cpp#1577

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

No branches or pull requests

2 participants