Without TSL there’s not much automation that can be done there and to blend two entirely different types of materials, you need to manually copy the code of either into a single shader and combine them - things overlap in way too many places and there’s no #ifdef / #ifndef anywhere in the chunks, like here for example - you’d get redefine-errors every 10-20 lines if you just merged the shaders blindly unfortunately ![]()
But as an alternative, if you’re not going to do it for every single mesh in the scene, you can do a UV-cast into a Plane for each material and blend the results - example. That way you can skip entirely the shader merging:

Lines 50-75 - you’d need to have a simple wrapper like that for every material type you’d be blending. Each FBO holds light-accurate final rendering of the mesh using a different material - all information included, normals, roughness, alpha etc. The position buffer in the mesh is unwrapped to match the UVs (technically you should even be able to do that on the CPU without custom shader at all, just un-index all child geometries and swap the position / UV buffers.)
Then all you need to do is blend the 2 FBO textures in a 3 LoC blend shader (Line 30-44.)