8 Likes
I dont know. I have windows 10, PC, GoogleChrome
Try delete some settings in material
mat["sprite"]=new THREE.ShaderMaterial({
uniforms:{
map:{value:[tex["smoke"],tex["fire"],tex["grass"]]},
time:{value:0}
},
vertexShader:vs["sprite"],
fragmentShader:fs["sprite"],
side:THREE.DoubleSide,
transparent:true,
depthWrite:false,
blending:THREE.CustomBlending,
blendEquation:THREE.AddEquation,
blendSrc:THREE.OneFactor,
blendDst:THREE.OneMinusSrcAlphaFactor
});
Same here, Windows 10, Chrome, Titan X. Seems to be generally the transparency.
Windows 10, Google chrome 103.0.5060.114 (64 bit).
AMD Radeon RX 560 Series.
Disabled “DoubleSide” and “blending”
Maybe into fragmentshader need normalize value of alpha and rgb
gl_FragColor.rgb*=gl_FragColor.a;
gl_FragColor.a*=vBlend;
Tested on another compute and notebook (laptop). No artifacts.
Fixed bug for some videocards. The problem was from the float equality comparison which was resulting to false, because of the float precision margin errors of GPU.
Solution 1: replace if(texNum == 0.0)
to if((texNum - 0.0) < 0.00001)
Solution 2: add float tex_num_2=round(tex_num);
Solution 3: add float tex_num_2=floor(num+0.5);
2 Likes