Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Shader Graph Vector Variables Wrong

Discussion in 'Graphics Experimental Previews' started by MrMetwurst2, Nov 22, 2018.

  1. MrMetwurst2

    MrMetwurst2

    Joined:
    Jul 16, 2009
    Posts:
    253
    Hey guys.

    2018.2.16f1 & LWRP v3.0.0
    Variables for Vector 2 & Vector 3 are exposing 4 values in the Material Inspector instead of 2 & 3 respectively.

    Known bug?

    Cheers!
    upload_2018-11-22_22-43-7.png
    upload_2018-11-22_22-44-6.png
     
  2. fogsight

    fogsight

    Joined:
    Apr 6, 2010
    Posts:
    65
    It's the same in 2018.3 LWRP 4.2.0
     
  3. Devogelt

    Devogelt

    Joined:
    Jan 26, 2013
    Posts:
    1
    This is still a problem. That, or I misunderstand the Vector 2 node.

    upload_2020-2-1_14-2-9.png

    Latest build, 2019.3.0f6
     
  4. bourriquet

    bourriquet

    Joined:
    Jul 17, 2012
    Posts:
    181
    manishpro65, comealong and Ghosthowl like this.
  5. Krooq

    Krooq

    Joined:
    Jan 30, 2013
    Posts:
    194
    Why in the feck, they even wrote doco for it, why????
    Maybe they just expect people to be writing custom editors all the time.
     
    Rodolfo-Rubens likes this.
  6. danamuise

    danamuise

    Joined:
    Sep 15, 2022
    Posts:
    31
    This is something I noticed in Unity Shader lab (the HLSL precursor to Shader Graph). There's no easy way to expose a Vector 2 in the material properties. In fact, replacing Vector with Vector2 produces an error, so I just go with:
    Code (CSharp):
    1. _DistortAnim("Animation Direction", Vector) = (0, 0, 0, 0)
    It's been this way for years, people often talk about it and have written custom shader UI property classes (MaterialPropertyDrawer) so, I bet there's a reason for it and they carried it over to shader graph