How can I get the exact Z axis global value into my Material?

I created a material that gives a wet look(darkened the diffuse and changed roughness) to my assets based on the z position using absolute world position so that I can create a sea level to my world. However, the value doesn’t use the exact z position in the world. All it takes is a little adjustment but I’d rather it set itself exactly to the same position as the global z axis value so that its easy to determine the sea level in the viewport as well as use it in the blueprints. I’m still rough on my understanding of materials and blueprints. Is there some math breakdown I’m supposed to do to get the exact value of the global z axis position into my material? I just want to have one parameter to control the sea level so that everything has the wet look. Thanks in advance for any help. I’m still learning a great deal.

World position node would give you exact position of each pixel in the world.

Thanks for the answer. I was already using a world position node but since you said that it gives the exact position of each pixel, I went through my material again and removed a bunch of nodes that were multiplying the effect. I got it working now as I wanted thanks!

Here is a screenshot in case your curious.