I see I should have asked more precisely.
Please have a look at the answer I have linked, my question is totally based on that.
The shader code in this answer can make an object fade in from the bottom to the top. My 'problem' with that is that this is defined done by setting a clip_height, which is an absolute value and is different for each mesh, depending on its height. I don't want to figure out the exact values for each mesh manually, I want to automate this.
One way I could think of is somehow getting the total height of the mesh in shader code and calculating clip_height based on the percent value instead of having it given as a parameter from the outside.
But there may be other and better ways, that's why I asked the question so open, I am a total noob in terms of shader code, this is the first thing I'm doing with it.
Thanks in advance,