Is it possible to internalise PBR-materials (Normal, Texture, Bump) in a script for rhino compute with the native components or is there a workarround?
You could return a doc instead of geometry. A doc can contain anything you can save in a Rhino model of course, including materials.
This example has a gh definition that creates a doc, adds geometry and materials (in a C# script) and returns the doc as a string that is then deserialized with rhino3dm.js. rhino3dm does support reading PBR materials from a Rhino file.
I am using PBR materials as well by first creating them all in Rhino and then I capture them into a shader component into Grasshopper where once they are internalized they are kept stored as xml material.
Working fine till now for me. I can have that shader component in any of my scripts and call one of the stored materials in the collection.