LayaAir 2.x修改方法:
如果是源码版是BlendMode.ts 找到[code] static BlendAdd(gl: WebGLRenderingContext): void {
WebGLContext.setBlendFunc(gl, gl.ONE, gl.DST_ALPHA,true);
}[/code]
替换为:
static BlendAdd(gl: WebGLRenderingContext): void {
WebGLContext.setBlendFunc(gl, gl.ONE, gl.ONE,true);
}
非源码版在laya.core.js里找到
static BlendAdd(gl) {
WebGLContext.setBlendFunc(gl, gl.ONE, gl.DST_ALPHA, true);
}[/code]替换为:[code] static BlendAdd(gl){
WebGLContext.setBlendFunc(gl, gl.ONE, gl.ONE,true);
}[/code]
LayaAir 1.x 修改方法:
在laya.webgl.js里 搜 BlendMode.BlendAdd=function(gl)
找到[code] BlendMode.BlendAdd=function(gl){
gl.blendFunc(/*laya.webgl.WebGLContext.ONE*/1,/*laya.webgl.WebGLContext.DST_ALPHA*/0x0304);
}
替换为:
BlendMode.BlendAdd=function(gl){
gl.blendFunc(1,1);
}