I’m afraid it’s not 100% clear what you want to do. Do you want to use roughness/metalness material parameters for a custom shader material? I mean an instance of THREE.ShaderMaterial or THREE.RawShaderMaterial?
Yes, I’m trying to write my own THREE.ShaderMaterial and I want to add a similar “roughness” parameter. Meanwhile I realised that all the related JS files (HDRCubeTextureLoader.js, PMREMCubeUVPacker.js, PMREMGenerator.js, RGBELoader.js) require the threejs module, so I just detached them (is that a bad practice btw?).