PixiJS requires stencil buffer to initialize and stencil buffer is not always supported on devices with WebGL support. See the source of the isWebGLSupported
function in PixiJS source, specifically these lines:
const contextOptions = {
stencil: true,
failIfMajorPerformanceCaveat: settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT,
};
What you potentially could do to support devices with WebGL without stencil is to overwrite the PixiJS function that creates the Renderer
instance and use stencil: false
in contextOptions
. I'm talking about the Renderer.create()
function.
Note, that by disabling stencil buffer PixiJS might not work correctly or at all, depending how it's written. Stencil buffer is used in PixiJS for masking, so if you do not use masks, you might be fine.
This PixiJS issue was already reported: https://github.com/pixijs/pixijs/issues/5902