how to control the same value on multiple different materials with an object's z location?
Simply use the Map Range node to clamp the results between -1 and 2.

Add a Map Range node with min = -1 and max = 2 values
Check Clamp
Select your empty's Z location and go RMB &gt; Copy Driver
Paste the driver to the Value field of the Map Range node.

The Result of the map range is shown here as a slider