PixiJS autoDetectRenderer inconsistency between WebGL1 and Canvas fallback
0 reputation · 31 May 2020, 04:33 UTC
The PixiJS autoDetect method is designed to select the most capable rendering engine based on browser support. While it clearly prioritizes WebGL2, the specific logic governing the transition between WebGL1 and the Canvas renderer when WebGL2 is unavailable is not explicitly defined in the documentation.
This ambiguity creates challenges when designing integration tests that require deterministic rendering behavior or specific shader support levels. If the environment silently switches from WebGL1 to Canvas due to browser-specific reporting, the rendering precision and performance-related assertions may fail, leading to flaky test results or false positives in headless-based CI/CD pipelines.
What is the documented priority sequence used by PixiJS when choosing between WebGL1 and Canvas if WebGL2 fails? How can developers programmatically force a specific fallback path during integration testing to ensure consistent output across different browser engines?