Search Unity

URP : Shader Graph : Cannot connect an Add (3) node to Vertex Position (3) Master Node

Discussion in 'Universal Render Pipeline' started by MartinParadis1970, Nov 26, 2021.

  1. MartinParadis1970

    MartinParadis1970

    Joined:
    Apr 12, 2019
    Posts:
    5
    Hello, I am using Unity 2021.2.3f1 and using URP. In Shader Graph, I cannot connect the output of an Add Node (3) to the Vertex Position (3) in the Master Node. Can you tell me what I done wrong ? Thanks a lot.

    upload_2021-11-25_20-53-21.png
     
  2. revolute

    revolute

    Joined:
    Jul 28, 2014
    Posts:
    50
    What is before multiply node? Certain nodes are not supported in vertex stage and will prevent you from connecting to vertex node.
     
  3. MartinParadis1970

    MartinParadis1970

    Joined:
    Apr 12, 2019
    Posts:
    5
    Hi, here what is before the multiply. The only weed thing it did was to construct a vector3 from a float... upload_2021-11-26_9-29-41.png
     
  4. Simon_E_Sorensen

    Simon_E_Sorensen

    Unity Technologies

    Joined:
    Feb 4, 2020
    Posts:
    10
    Try and use Sample Texture 2D LOD node?
     
  5. MartinParadis1970

    MartinParadis1970

    Joined:
    Apr 12, 2019
    Posts:
    5
    Ok, I did a test that demonstrate the bug... The graph doesn't want to connect a float from a TextureSampler (let's say Alpha, but it doesn't matter, R, G, B does not work either). But a simple float from the Shader's Input works... I don't understand: upload_2021-11-26_10-32-50.png
     

    Attached Files:

  6. MartinParadis1970

    MartinParadis1970

    Joined:
    Apr 12, 2019
    Posts:
    5
    @Simon_E_Sorensen : Thanks, a Texture2D LOD works. But, my point here is : Don't fail silently, if the graph cannot connect tell us why. Because it is frustrating to see the color of the port to be the same, the type to be the same and cannot connect... Thanks again..
     
    erenaydin and Kokowolo like this.
  7. Bovine

    Bovine

    Joined:
    Oct 13, 2010
    Posts:
    195
    Yes, I'd like to know why this is also. Just playing with packing height into texture albedo alpha and boom won't connect.
     
  8. funkyCoty

    funkyCoty

    Joined:
    May 22, 2018
    Posts:
    727
    lol
     
    erenaydin likes this.
  9. Kokowolo

    Kokowolo

    Joined:
    Mar 26, 2020
    Posts:
    60
    I second this. Spent way too long trying to resolve an issue that looked more like an editor bug than an actual one.
     
  10. Potakowski

    Potakowski

    Joined:
    Dec 2, 2017
    Posts:
    2
    "This Node is useful for sampling a Texture in the vertex Shader Stage as the Sample Texture 2D Node is unavailable in this Shader Stage."
    That's what I found on the description of this node.

    Vertex Shader Stage is happening before Fragment one and not all nodes are possible to connect there.