3.18.0 Shader error - Cannot read property 'TRIANGLES' of undefined at CustomPipeline.initialize

When initialized, a Texture Tint Pipeline accesses the Renderer’s WebGL context to read constants - in this case, gl.TRIANGLES. If you initialize a Texture Tint Pipeline in a game which uses the Canvas Renderer, there will be no WebGL context, which will cause that error.

What’s probably happening here is that your mobile devices don’t support WebGL and instead fall back to the Canvas Renderer. Custom pipelines will only work in devices which support WebGL. To prevent the error, you should check which renderer is being used (for example, by checking game.renderer.type, which will be equal to Phaser.WEBGL in a WebGL game) and skip all of the pipeline operations (especially construction) if you’re running in Canvas.