I’m testing out Three.js NodeMaterial with the WebGPU backend. I know the feature is experimental right now. Is there a way to define a global function that can be called in any WGSL code, for example:
const testGlobalFunctionCall = func( `
fn testGlobalFunctionCall( color:vec3<f32> ) -> f32 {
let gf = myGlobalFunction(); //<---- global function
return 1.0;
}
`)