Using geometry nodes, I set up hexagons to move up and down in a sine wave pattern as the scene moves through time. Then, I added noise as an offset, to vary the hexagons' height as they move up and down the sine wave. When assigning color to the material, I'd like the color to come from the hexagons' height, but only their heights from before I added the noise offset in the geometry nodes graph. Right now in the shader nodes editor, the "Object Info" node's Location value is outputting the final location, after the geometry is offset by noise. Can I get the pre-noise location to drive my shader color?
Edit: Capture attribute doesn't seem to be working the same way as one answer shows. I'm posting screenshots and my file for reference. I'm using Blender 3.1 :