Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question how to input same vertex position value in vertex and fragment function in shader graph

Discussion in 'Shader Graph' started by sdqq1234, Mar 9, 2022.

  1. sdqq1234

    sdqq1234

    Joined:
    Jan 9, 2013
    Posts:
    7
    I want use the position to caculate a 3d voronoi noise.
    I use the voronoi noise value to offset vertex position and also get the color.
    But I can't use the same positon value input to fragment function.
    How can I input same position value into 3d voronoi noise to get same value in vertex and fragment function?
    I want use the shader in vfx graph !

    I want left(not shader graph made),but shader graph can only give me right:
    upload_2022-3-9_15-51-14.png
     
  2. ATMLVE

    ATMLVE

    Joined:
    Jun 11, 2023
    Posts:
    74
    Necroing this thread as it comes up when I search the same thing to no avail. Why is this? I have to do everything twice to achieve the effect. Seems pointless.