evanw / glfx.js

An image effects library for JavaScript using WebGL
https://evanw.github.io/glfx.js/
MIT License
3.26k stars 402 forks source link

PNG with partially transparent pixels display incorrectly IE #27

Open inssein opened 9 years ago

inssein commented 9 years ago

I was having a tough time with a few cliparts of my own that had partially transparent pixels (only in IE).

After a lot of googling, I came across:

gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);

It seems to have done the trick. I was going to submit a PR, but wasn't sure where the best place to do it was. initialize() in the canvas.js file is probably a safe bet, and if you agree I can quickly send a PR.

inssein commented 9 years ago

If I understand this correctly, this is what

premultipliedAlpha: false

is supposed to do, but is unsupported in IE?