How to use Bump Offset with Texture Packed Data?

I’ve been struggling hours with a problem on hooking up bump offset using texture packing. I am texture packing Roughness, Metallic, AO, and Height into the corresponding RMAH texture parameter and want to use the alpha channel as the height data. The problem is I cannot simply just use the same texture sample and loop around. I’ve been trying to figure out how to add in UV Coord data later on as a way to circumvent this issue but haven’t found any resources. I’d hate to have to use a whole separate texture sample, regardless of the whether its shared:wrap or not just to have this set up. On a side note, I am using the same node structure in this material in a material function as well in order to be able to have a material set up with different material layers using a RBGA mask, so optimization is really crucial here.

Any ideas?

Imgur

Thanks!

You can’t loop the instructions.
Duplicate the texture sampler and hook your height map data to the BumpOffset node, having duplicated samplers doesn’t cost anything extra. If you run into sampler limits, you can switch the sampler source per texture sampler to “Shared: Wrap”

115326-capture.jpg