You would need to have the texture inside the object itself, but I could definitely be done. I need to find time to play around with it but in the nodes you can add attributes in the texture attribute has recently been added. So it would be interesting to see how to get that working in to see if it can work similar to the color node.