WgslShaderGenerator doesn't actually produce wgsl, but just an adapted variant of glsl that is suitable for conversion to wgsl. For real-time web environments this workflow from MaterialX -> GLSL -> SPIRV -> wglsl is not performant. We should investigate in a direct wgsl generator.
I've logged this issue to get feedback from community about their thoughts and ideas in this area.