[WebGPU] Significant performance drop and shadow quality regression in r182 vs WebGL r170

I am exploring the migration of my project from WebGL (r170) to WebGPU (r182). I have observed unexpected performance degradation and rendering quality issues compared to the previous WebGL implementation.

Specifically, I encountered the following problems:

1. **Performance Regression:**

\*   The general frame rate when loading and interacting with models in WebGPU (r182) is noticeably lower than in WebGL (r170).

\*   **\*\*Post-processing Impact:\*\*** Enabling post-processing in WebGPU causes a severe drop in frame rate, performing much worse than the WebGL equivalent (which had shadows + anti-aliasing enabled).

2. **Shadow Quality:**

\*   **\*\*WebGL (r170):\*\*** Shadows were relatively soft and realistic.

\*   **\*\*WebGPU (r182):\*\*** Shadows appear "harder" and less realistic.

**Screenshots**

* **WebGL (r170) Result:**

* **WebGPU (r182) Result:**

**Reproduction**

I have created a reproduction sandbox here:

https://codesandbox.io/p/github/kang-Z-A/webgpu-example/main?import=true

**Steps to Reproduce**

1. Open the sandbox link above.

2. The scene loads with Three.js r182 (WebGPU).

3. Load the test model provided (`public/threejs/building.glb`) or observe the default scene.

4. Notice the frame rate (stats) and shadow appearance.

**Expected Behavior**

I expected the WebGPU renderer to provide performance comparable to or better than the WebGL renderer, and for the shadow quality to remain consistent or improve.

**Environment**

* **Three.js version:** r182.0 (WebGPU) compared to r170.0 (WebGL)

* **Device:** Desktop PC

* **CPU:** Intel Core i7-13700K

* **RAM:** 32GB

* **GPU:** NVIDIA GeForce RTX 4070 Ti

* **OS:** Windows 11

* **Browser:** Chrome 144.0.7559.60

**Question**

Is this performance gap expected at the current stage of the WebGPU renderer? Are there specific configurations or optimization strategies required in r182 to match the performance and visual quality of the standard WebGL renderer?

1 Like

For one thing, I believe the ShadowBias is different for WebGL2 and WebGPU. For WebGPU, a good starting number to use is -0.0005.

WebGPU is still under active development. If you don’t require WebGPU specific features, you can just continue to use the WebGLRenderer.

If you see performance regressions with the WebGLRenderer then that is something worth investigating.

Comparing the two renderer types directly isn’t as useful at the present time, imo. The WebGLRenderer has had a decade of optimizations… WebGPURenderer is still very actively being developed.

1 Like

We have fixed the performance regressions on dev so r183 should give you a noticeable performance boost compared to r182. Related issue:

3 Likes