Swiftshader is going away, what to do?

Hi everyone,

First off, thank you for the incredible work on Three.js! We’ve been using it for over a decade, and it’s been a cornerstone of our application.

We’re currently in the process of upgrading from version r76 to r172, and we’ve encountered a potential roadblock.

In our application, some users rely on Citrix environments with limited graphics capabilities. Historically, we used CanvasRenderer (now deprecated) until software WebGL became available.

However, on these clients, I’m now seeing the following warning in the logs:

“[GroupMarkerNotSet(crbug.com/242999)!:A0D05A02AC440000] Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content.”

After researching, I found this article: Chromium Deprecation Notice. It states:

Allowing automatic fallback to WebGL backed by SwiftShader is deprecated and WebGL context creation will fail instead of falling back to SwiftShader. This was done for two primary reasons:

  1. SwiftShader is a high security risk due to JIT-ed code running in Chromium’s GPU process.
  2. Users have a poor experience when falling back from a high-performance GPU-backed WebGL to a CPU-backed implementation. Users have no control over this behavior, and it is difficult to describe in bug reports.

From what I can see, this change is estimated to ship starting with Chromium version 135, which appears to be just a few months away: Chromium Release Schedule.

Questions:

  1. Will this deprecation mean that rendering in Three.js will completely break in Citrix environments once SwiftShader fallback is disabled?
  2. Will WebGPU become a viable alternative by then for environments like Citrix, or should we explore other options?

Options I’m Considering:

Here are the paths I’ve considered, but I’d greatly appreciate insights or recommendations:

  1. Hope WebGPU is ready: WebGPU seems promising, but it’s unclear if it will work reliably in Citrix or similar environments within the required timeline.
  2. Switch to SVGRenderer: I’ve done some basic experiments, and while it could work, achieving acceptable quality will require significant development effort and compromises.
  3. Revive SoftwareRenderer: Attempt to bring the old SoftwareRenderer up to date with the latest Three.js version.
  4. Downgrade: Stick with Threejs version 109 or earlier, where the Softwarerenderer is still present.
  5. Build a Custom Renderer: Create a specialized renderer for this use case, but this is clearly a major undertaking.
  6. Require Users to Enable --enable-unsafe-swiftshader: This could temporarily restore functionality, but it’s challenging to implement since our users are spread across various organizations. Additionally, this option may raise concerns among IT staff due to its “unsafe” label, potentially making it difficult to gain approval.

Any thoughts, advice, or experiences regarding these options? Are there any strategies I might have overlooked?

Thank you in advance for your help!

Edit: I also asked about this on the chromium bug tracker; Chromium

Best regards,