Search Unity

Feature Request Problem With Accessing The Manipulated Vertex Position In The Fragment Stage (in Shader Graph)?

Discussion in 'Shader Graph' started by TheTop, Apr 8, 2019.

  1. TheTop

    TheTop

    Joined:
    May 15, 2016
    Posts:
    7
    Hello,
    a shader I am working on needs to use the vertex world position from the vertex stage (Master Position Input) in the fragment stage (Master Color Input). I hoped I could achieve that by using the position node set to world space. The documentation says that node is dependent on the shader stage, so I should get the position of the moved fragment from that node, right? In reality the position node does not use the offset vertices, instead it takes the base vertices from the mesh.
    What am I missing?

    shader.JPG

    Thank you for your help!
     
    Jick87 likes this.
  2. Kink3d

    Kink3d

    Joined:
    Nov 16, 2015
    Posts:
    45
    Hi,

    Right now the generator is missing a remap step that will allow you to access the modified vertex position in the fragment shader. This is on our radar and I will be discussing this with the team over the next week.
     
    StaggartCreations, Jick87 and TheTop like this.
  3. TheTop

    TheTop

    Joined:
    May 15, 2016
    Posts:
    7
    It is nice to know that feature will be added soon, now I can focus on the integration of the shader into my codebase.
    You guys do an awesome job with the Shader Graph tool!
     
  4. JavierTlon

    JavierTlon

    Joined:
    Jun 12, 2019
    Posts:
    1
    Hello! Any ETA on this remap step? Is it already implemented? Thanks a lot!
     
  5. VirtualDarren

    VirtualDarren

    Joined:
    Apr 27, 2017
    Posts:
    2
    We are also waiting for this implementation. Any news?