How do individual Fog for instances in shader?

Hi!
Here Palms (on a Retrowave road) I use instances of palms with fog. Though I just modified a default material THREE.MeshBasicMaterial().