The materials need to be separated within the function call...
import React, { useRef } from 'react'
import { useGLTF } from '@react-three/drei'
export default function Model(props) {
const { nodes, materials } = useGLTF('/shirt_baked.glb')
return (
<group {...props} dispose={null}>
<mesh geometry={nodes.T_Shirt_male.geometry} material={materials.lambert1}>
<meshLambertMaterial color={props.color} />
</mesh>
</group>
)
}
useGLTF.preload('/shirt_baked.glb')