iTowns / itowns

A Three.js-based framework written in Javascript/WebGL for visualizing 3D geospatial data
http://www.itowns-project.org
Other
1.06k stars 290 forks source link

WebGPU support #2069

Open jailln opened 1 year ago

jailln commented 1 year ago

Implement a support of WebGPU (but keep webgl support).

WebGPU has been released. It is currently available in Chrome and will be in other browsers soon. It should provide better performances and better developper experience in working with the GPU.

Threejs already started to implement WebGPU. A first step would be to try to use threejs' implementation of webGPU. Then, we will also have to reimplement itowns' shaders and webgl parts with webgpu.

jailln commented 3 months ago

From the following article: "Experiments shows that for rendering 3D city models in abrowser environment without using any optimization techniquesWebGPU performs 2.5x-3x better performance than WebGL."

One more reason to try it on :grin:

LoicUTC commented 3 months ago

Amazing :)

Desplandis commented 3 months ago

Yeah, I agree that we should experiment with WebGPU in the short/mid term.

However, it seems that three.js will not support ShaderMaterial for WebGPURenderer, this means we could not write wgsl directly... They recommend the use of either the new node material system or use their own three.js shading language (tsl) but last time I checked neither were well-documented (or with a few examples)...

jailln commented 3 months ago

Ah that's not good news indeed :/ Hopefully they'll document it or provide a better way until we find time to try it