Search Unity

Question Get "mesh height" in the Sharder Graph

Discussion in 'Shader Graph' started by Gydhia, Jan 12, 2021.

  1. Gydhia

    Gydhia

    Joined:
    Jan 12, 2021
    Posts:
    1
    Hello !
    I'm kinda new on the shader graph, and there are some principles that are hard for me to understand.

    Actually I want to make a shader that simply fill a mesh from bottom to top according to a certain percentage which i settled as parameter.

    But it's not filling proportionnaly, so I'd like to add it with : selected% * height / 100, but I can't figure where to get the "height" or anything that I could use as a height.

    Here's the screenshot, I would change the 2nd substract with the method that I described.
    upload_2021-1-12_14-0-36.png

    Thanks for your help !