WebGL FBO texture with transparent issue

39 Views Asked by At

So the questions is : When I am using webgl to render stuff to a FBO, let's say a quad with 512 * 512, if I set the color to be (1, 0, 0, 0.5), which means its alpha is 0.5

Then I use the color attachement as a texture for a sprite, then render it to screen, i found that the alpha does not work.

I searched the question about premultiAlpha, but since my texture is not a image, i don't think it will work.

Even if i use gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);

Still not work.

Any help? Thanks a lot

0

There are 0 best solutions below