renderer.js:1 Error: Error compiling fragment shader: ERROR: 0:404: '!' : wrong operand type - no operation '!' exists that takes an operand of type lowp int (or there is no acceptable conversion) ERROR: 0:404: '&&' : wrong operand types - no operation '&&' exists that takes a left-hand operand of type 'bool' and a right operand of type 'void' (or there is no acceptable conversion)
renderer.js:1 Error: Error compiling fragment shader: ERROR: 0:404: '!' : wrong operand type - no operation '!' exists that takes an operand of type lowp int (or there is no acceptable conversion) ERROR: 0:404: '&&' : wrong operand types - no operation '&&' exists that takes a left-hand operand of type 'bool' and a right operand of type 'void' (or there is no acceptable conversion)
The development environment is normal but the packaging is not normal with webpack packaging
Can you post reproduction steps?
Duplicate of #584
Can you post reproduction steps?
Please see my comment on #584.
Just use "new Function",webpack will not compile it,example:
let process = this.gpu.createKernel(new Function (['canvas0', 'canvas1'],` let pixel0 = canvas0[this.thread.y][this.thread.x] let pixel1 = canvas1[this.thread.y][this.thread.x] if (pixel1[0] != this.constants.defaultColor[0] || pixel1[1] != this.constants.defaultColor[1] || pixel1[2] != this.constants.defaultColor[2] || pixel1[3] != this.constants.defaultColor[3]) { pixel0[0] = pixel1[0] pixel0[1] = pixel1[1] pixel0[2] = pixel1[2] pixel0[3] = pixel1[3] } this.color(pixel0[0], pixel0[1], pixel0[2], pixel0[3]) `), { constants: { loopLength: canvases.length, defaultColor: defaultColor.map(v => v / 255) } }).setGraphical(true).setOutput([canvases[0].width, canvases[0].height]);