Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Question How would you render 'water' underneath a plane having wavy CPU mesh deformations done to it?

Discussion in 'Shader Graph' started by ynm11, Jan 26, 2024.

  1. ynm11

    ynm11

    Joined:
    Jul 6, 2021
    Posts:
    57
    I have a plane mesh that I am trying to make 'water' from by deforming the vertices on CPU in a wavy motion. (I know this is not ideal for performance). But currently I am trying to figure out how to render water underneath the plane such that it perfectly follows the wavy 'waterline' of the plane mesh's movements.

    I have tried a Fog-based solution, but that did not allow for aligning with the plane's deforming 'waterline'.

    Therefore, does anyone have ideas for how to render water underneath a deforming 'water' plane mesh, such that the wavy 'waterline' of the plane's moving vertices is indeed adhered to? I'm posting in the Shader Graph category because I have a feeling shaders will ultimately be the best solution, but I don't know where to begin.




    Thank you.