WPO Lookat

Idk, if unreal pass rotation or quat to shader , than you can potentially retrieve this data in material with custom node.
You can pass rotation as ISM custom data floats. You can pack rotation as Quaternion (only 4 floats, instead of 3 vectors/9 floats) and unpack it shader.