To see proof that this works, use gltf_viewer with -u and examine the node hierarchy. You will now see the correct material names instead of the ubershader names.