Here’s some material functions that might help a bit. They use old stuff but it might be good enough to get the idea across