-
-
Notifications
You must be signed in to change notification settings - Fork 35.2k
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: Added webgpu_nodes_loader_materialx #24958
Conversation
The problem is that you use a GLSL version of MaterialX nodes (the official version), not a node (i.e. language-independent) version (there is not one yet). GLSL cannot work with WebGPU. |
Oh! D'oh! Hmm... We should be better at error messages though... |
I was thinking of make a transpiler from |
A on-the-fly transpiler or offline? |
Both I imagined, although offline seems more appropriate for performance. For API something like this: const decoder = new GLSLDecoder();
const encoder = new WGSLEncoder();
//const encoder = new ShaderNodeEncoder();
const transpiler = new Transpiler( decoder, encoder );
const wgslCode = transpiler.parse( 'glsl source code' ); |
Sounds good to me! |
@sunag |
I think a transpiler from GLSL to ShaderNode would be even better and more future-proof... |
@LeviPesin Explain why that would be better than simply glsl to wgsl |
Because ShaderNodes can be compiled to both GLSL and WGSL. |
Ohh!? Didn't know, because I was about to give up, WGSL's syntax is so complex, I might as well learn rust if I'm gonna learn that |
Description
Trying to add the WebGPU version of
webgl_nodes_loader_materialx
.@sunag I guess the
WebGPURenderer
path is still missing some things?