Search Unity

Feedback [SOLVED] Length node doesnot work

Discussion in 'Shader Graph' started by URocks, Nov 25, 2019.

  1. URocks

    URocks

    Joined:
    May 1, 2014
    Posts:
    159
    Just try to plug UV to length node, instead of quarter circle gradient from black to white you will get pure white color

    I used the newest shader graph 7.1.5
     
  2. LandonTownsend

    LandonTownsend

    Unity Technologies

    Joined:
    Aug 21, 2019
    Posts:
    35
    Hi,

    UV by default outputs a vector4 which has a W value of 1:
    upload_2019-11-25_15-57-10.png
    To get the effect you're looking for, convert the UV to a vector2 using the "split" node and then take the length: upload_2019-11-25_16-0-23.png
     
    URocks likes this.
  3. URocks

    URocks

    Joined:
    May 1, 2014
    Posts:
    159
    Perfect Thanks a lot