Search Unity

Line Renderer wrong Texture Position on variable width (HDRP)

Discussion in 'General Graphics' started by stefnw83, Sep 25, 2021.

  1. stefnw83

    stefnw83

    Joined:
    Aug 26, 2021
    Posts:
    2
    Hello,
    im trying to create a Laser-Shader and put it on a Line-Renderer. Everthing works fine except when i change the width of the Line-Renderer: the texture position on the mesh of the Line-Renderer will be broken. (maybe, if the width is zero the first line segment is a triangle?!) I want the texture to align from the starting point to the end point. Also the texture is distoreded when using End Cap Vertices.

    Width: Start and End 1.0
    upload_2021-9-25_13-16-31.png

    Width: Start 0.0 and End 1.0
    upload_2021-9-25_13-11-14.png

    What am i missing? Is it possible to align the texture like this:
    upload_2021-9-25_13-27-34.png

    I'am using HDRP and Shader Graph:
    upload_2021-9-25_13-11-42.png

    Thank you! Im stucked into this for about 2 days now...
     
  2. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    These are limitations of the built in LineRenderer.

    You could evaluate some asset store offerings as alternatives though they may cost money. Eg Vectrosity.

    We are currently prioritising other areas of Unity, so I’m not sure if improvements here are likely.
     
  3. stefnw83

    stefnw83

    Joined:
    Aug 26, 2021
    Posts:
    2
    Thanks for your reply! Now I can sleep well, because its a technical limitation and not my inability! :)

    I will check the store!

    Thank you!