Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examples: Add Performance Comparison for WebGL and WebGPU Renderers #29077

Merged
merged 4 commits into from
Aug 7, 2024

Conversation

RenaudRohlinger
Copy link
Collaborator

@RenaudRohlinger RenaudRohlinger commented Aug 7, 2024

Related comments: #29066 (comment) #29066 (comment)

Description

This PR introduces two new examples to compare the performance of WebGL and WebGPU renderers using a non-optimized GLTF scene. The scene consists of approximately 800 meshes and 140,000 vertices.

The goal of these examples is to provide a direct comparison of rendering performance between WebGL and WebGPU. This will help identify areas for optimization and guide further development of the WebGPURenderer.

image

WebGL:
https://raw.githack.com/renaudrohlinger/three.js/utsubo/feat/performance/examples/webgl_performance.html

WebGPU:
https://raw.githack.com/renaudrohlinger/three.js/utsubo/feat/performance/examples/webgpu_performance.html


Performance Observations

On a MacBook Pro M1 Max:

WebGLRenderer:

  • Steady 144fps+

WebGPURenderer (currently forced on the WebGL Backend to highlight the difference):

  • WebGPU: Approximately 110fps
  • WebGL Fallback: Approximately 30fps

/cc @mrdoob @sunag @Mugen87


This contribution is funded by Utsubo

@RenaudRohlinger RenaudRohlinger added this to the r168 milestone Aug 7, 2024
@mrdoob
Copy link
Owner

mrdoob commented Aug 7, 2024

On a Pixel 8:

WebGLRenderer:

  • Steady 120fps

WebGPURenderer:

  • Approximately 70fps

@Makio64
Copy link
Contributor

Makio64 commented Aug 7, 2024

Macbook pro M3 max :
WebglRenderer : 120fps (capped)
WebGPURenderer (webgl fallback) 38-44fps

@sunag
Copy link
Collaborator

sunag commented Aug 7, 2024

It will be very useful for testing.

@sunag sunag merged commit 03419b8 into mrdoob:dev Aug 7, 2024
11 checks passed
@0b5vr
Copy link
Collaborator

0b5vr commented Aug 8, 2024

I've left my investigation about the comparison on Discourse.

https://discourse.threejs.org/t/the-new-webgl-vs-webgpu-performance-comparison-example/69097

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants