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

WebGPU and NodeMaterial: WGSL Support #22688

Merged
merged 16 commits into from
Oct 14, 2021
Merged

WebGPU and NodeMaterial: WGSL Support #22688

merged 16 commits into from
Oct 14, 2021

Conversation

sunag
Copy link
Collaborator

@sunag sunag commented Oct 14, 2021

Description

I did an approach entirely using flows for NodeBuilder for that we can remove ShaderLib approach and build material without a GLSL scheme in ES6 with a similar GLSL syntax.

We removed support for GLSL and glslang.js dependencies which had a reduction of 922 KB, including greater performance in shader compilation.

The port of GLSL for WebGPU is too experimental and caused numerous bugs only in my last implementations, unlike of WGSL that is the native shading language of WebGPU and is a bit more low-level allowing more control and optimization for Shader Graphs like NodeMaterial. A happy ending at last, in fact a new start :)

Yet, much work in flow process can be done in NodeMaterial but I think that we first can mature the integration and provide more natives features supported of Three.js for WebGPU like we did in: SkinningNode, and adding basic support for analytic lights and PBR using ShaderNode ( #22662 )

Link

https://raw.githack.com/sunag/three.js/dev-wgsl/examples/index.html?q=webgpu

Related issue

ShaderNode - #22603

This contribution is funded by Google via Igalia.

@mrdoob mrdoob added this to the r134 milestone Oct 14, 2021
@mrdoob mrdoob merged commit ceb6a13 into mrdoob:dev Oct 14, 2021
@mrdoob
Copy link
Owner

mrdoob commented Oct 14, 2021

Thanks!

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.

2 participants