Pixi.js: Support WebGL without stencil

Created on 10 Jul 2019  路  6Comments  路  Source: pixijs/pixi.js

Expected Behavior

Browser/device configurations that support WebGL but don鈥檛 support stencil should use fallbacks for features such as masking, that the framework is currently relying on stencil to perform.

Current Behavior

Configurations without stencil support will fail with a runtime error saying that WebGL isn鈥檛 supported and to use the legacy branch instead.

Possible Solution

Masking can be performed in other ways in WebGL. Some explanations of two alternate methods can be found on this stackoverflow thread

Environment

  • **pixi.js @latest
$75 馃挵Bounty 馃摙 Accepting PRs 馃敟 High Priority 馃檹 Feature Request

Most helpful comment

@bigtimebuddy @ivanpopelyshev when this feature will be available?

I Still get "WebGL renderer unsupported in this browser" with Chrome on PixiJS 5.3.0

All 6 comments

I agree, and I think I know fallbacks. I'm gonna prepare big stencil-related PR for 5.2.0.

I also discovered that v5 uses stencil for every renderTexture by default, and on windows that actually multiplies used memory by 2, gonna fix that to.

I also agree, using fallbacks for when we don't have stencil rather than just giving up on WebGL entirely would be awesome.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@ivanpopelyshev addressed this in his two recent PRs for stencils. closing.

@bigtimebuddy @ivanpopelyshev when this feature will be available?

I Still get "WebGL renderer unsupported in this browser" with Chrome on PixiJS 5.3.0

I also have this problem with Chrome Version 85.0.4183.83 (Official Build) (64-bit) on MacOS 10.12.6 (PIXI version 5.3.2).
What fails is the call to gl.getContextAttributes() returning null inside isWebGLSupported

Edit:
This setting fixed my problem on Chrome:
In Chrome:flags > enable WebGL Draft Extensions

Was this page helpful?
0 / 5 - 0 ratings

Related issues

distinctdan picture distinctdan  路  3Comments

st3v0 picture st3v0  路  3Comments

courtneyvigo picture courtneyvigo  路  3Comments

SebastienFPRousseau picture SebastienFPRousseau  路  3Comments

YuryKuvetski picture YuryKuvetski  路  3Comments