Search Unity

what is position as uv1 (please Video Learning Or Image)

Discussion in 'UGUI & TextMesh Pro' started by MyUnitydream, Sep 8, 2015.

  1. MyUnitydream

    MyUnitydream

    Joined:
    Jul 2, 2015
    Posts:
    22
    Hi To All.

    My Question Is:

    what is position as uv1?

    this component is in component>UI>Effect>Position As UV1

    By Thanks
    Myunitydream
     
  2. MyUnitydream

    MyUnitydream

    Joined:
    Jul 2, 2015
    Posts:
    22
    only one answer please...
     
  3. MyUnitydream

    MyUnitydream

    Joined:
    Jul 2, 2015
    Posts:
    22
    hi....
    hi....
     
  4. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,225
    It passes the canvas position through to the first UV channel. This can be used for things like refraction or UV offset sampling in a custom shader.
     
  5. MyUnitydream

    MyUnitydream

    Joined:
    Jul 2, 2015
    Posts:
    22
    Please give me an answer with image or video.

    I am not understanding

    What is UV Channel?

    By Thanks
     
  6. phil-Unity

    phil-Unity

    Unity UI Lead Developer

    Joined:
    Nov 23, 2012
    Posts:
    1,226
    Google UV channel, its a graphics thing. You could also download the UI example project from the asset store and look as some of the example scenes as some use the UV channel
     
  7. ceebeee

    ceebeee

    Joined:
    Mar 7, 2017
    Posts:
    395
    Hopefully some day someone gives a real answer, because these answers are terrible. Please give *an example* and not technical jargon.
     
    edmund_aloetius likes this.
  8. baohmab

    baohmab

    Joined:
    Nov 15, 2016
    Posts:
    3
    Hi
    I hope exactly any things for this question.
    Thanks.
     
  9. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,799
    What is the question? What are UVs?
     
  10. baohmab

    baohmab

    Joined:
    Nov 15, 2016
    Posts:
    3
    I can't understand about the component.
    What's this component [Position as UV1] ?
    https://docs.unity3d.com/Manual/script-PositionAsUV1.html

    "
    Position as UV1

    This adds a simple Position as UV1 effect to text and image graphics.
    "

    What 's "simple Position", How can I use this component?
    Thanks.
     

    Attached Files:

    • ex.png
      ex.png
      File size:
      7.5 KB
      Views:
      1,899
  11. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,799
  12. baohmab

    baohmab

    Joined:
    Nov 15, 2016
    Posts:
    3
    I feel it to be the component what don't be usually use without custom component.
    Thanks for your help.
     
  13. ceebeee

    ceebeee

    Joined:
    Mar 7, 2017
    Posts:
    395
    Ok, god. Only now with seeing the code does it make any sense whatsoever.

    It saves the vertex Position in Worldspace as the UV data! So as an element moves, the UV data would shift.

    Why couldn't someone just say that.
     
  14. ewanmellor

    ewanmellor

    Joined:
    Jan 23, 2017
    Posts:
    1
    Further to ceebeee's answer, I presume that since it is taking input from UIVertex instances, that it is actually the position in screen space, not world space.
     
    AlejMC and ceebeee like this.
  15. SAP

    SAP

    Joined:
    Feb 13, 2012
    Posts:
    41
    Maybe this part of this book is useful:

    https://www.oreilly.com/library/vie...20/4755b80b-f032-4759-874c-3b60b8bf6822.xhtml

    They have said just these lines:

    From The Book: "The Position as UV1 component allows you to change the UV channel that the canvas renders on. This is used if you want to create custom shaders that utilized baked light maps."
    Sadly, custom shaders are a pretty heavy topic and go past the scope of this text."
     
  16. AlejMC

    AlejMC

    Joined:
    Oct 15, 2013
    Posts:
    149
    Just bumped into this as I might have a use for it but can't find the difference between just using the Vertex Position and the copy of Position sent to UV1.
    At least on Overlay Canvases that is.