Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question How to accurately display liquid amount in a shader graph?

Discussion in 'Shader Graph' started by combatcat74, Nov 21, 2022.

  1. combatcat74

    combatcat74

    Joined:
    Feb 11, 2021
    Posts:
    2
  2. halley

    halley

    Joined:
    Aug 26, 2013
    Posts:
    1,903
    The shader graph has absolutely no idea how much "volume" your polygons represent. There is no way. It varies with every shape, and every asymmetric rotation of the shape. You will have to decide the level through some other modeling scheme, and communicate the level to the shader you have.

    Edit: it looks like you are moving the model, or using the wrong coordinate space for you to specify the level to the shader parameters.
     
    combatcat74 likes this.
  3. combatcat74

    combatcat74

    Joined:
    Feb 11, 2021
    Posts:
    2
    I figured out a way to fix this through an external script, what I was trying to do isn't possible in shader graph alone.