pixijs shader 设置透明度的方法
precision mediump float; varying vec2 vTextureCoord; varying vec4 vColor; uniform sampler2D uSampler; uniform sampler2D noise; uniform float customUniform; void main(void) { vec2 r = vTextureCoord; vec4 tex = texture2D(uSampler,r); vec4 tex1 = texture2D(noise,r); float opcity=1.0; if(tex1.r==1.0 && tex1.g==1.0 && tex1.b==1.0){ tex *= 0.0; } // vec4 fg = texture2D(uSampler, vTextureCoord); // fg.a = .0; // Why are elements still displayed gl_FragColor = tex; // gl_FragColor = vec4(1.0,0.3,0.3,0.0); }