Search Unity

Question Line Renderer with Tesselation shader doesn't render

Discussion in 'Universal Render Pipeline' started by leftClaw, Jul 24, 2022.

  1. leftClaw

    leftClaw

    Joined:
    Feb 21, 2017
    Posts:
    2
    When I use a custom tessellation shader on a line renderer or trail renderer it disappears. This seems to happen with shaders I write as well as examples I find on the internet. I'm in Unity 2019.4 URP but have seen the same behavior in Built in Pipeline in 2018 in a past project as well. It seems to happen with and without instancing on (I'm working in VR)

    Particle systems render fine, but the trail component within them also does not show up.

    Is there anything specific or custom about how line renderers work that I need to account for to make their meshes render within a tessellation shader? All other mesh and skinned mesh renderers work fine.
     
    Last edited: Jul 24, 2022
    iendsl likes this.
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,343
    Tessellation requires a vertex normal. Trails do not have those by default, unless you enable “Generate Lighting Data.”
     
  3. leftClaw

    leftClaw

    Joined:
    Feb 21, 2017
    Posts:
    2
    Thanks for the idea, unfortunately I tried it out and still no luck. I'm wondering if its something like that though where there's some property that just doesn't have that's breaking it in a unique way. unity wireframe preview appears like the vert positions are NaN or moved somewhere far away