Some explanation:
I get the position coordinates of the current pixel.
To get the position of the upper pixel, I have to get the current size of the node and use it to divide 1: this way I have the size of one pixel that I can subtract to current position Y to get the upper pixel coordinates (X does not change, and reminder: X,Y starts from top left angle). Then I make a condition comparing both values.