Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Resolved Read / use edge data from meshes in shadergraph?

Discussion in 'Shader Graph' started by Heptagram064, Jul 1, 2023.

  1. Heptagram064

    Heptagram064

    Joined:
    Feb 22, 2022
    Posts:
    94
    Hello,

    Im working on a outline shader (URP-Shadergraph). Thus far i already have depth based outlines, and object intersection outlines. When i was wondering on how to fill the lines in the middle i remembered how you could mark 'edge data' to meshes in 3D mesh editing software like blender;
    upload_2023-7-1_23-8-10.png
    This made me wondering, Could shadergraph read / use edge data like this? Or would there be a 'Shadergraph Compatible Edge Data' variant?
     
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,362
    You can't get the direct edge data. Best outline shaders use a combination of depth and normal data to highlight all edges
     
  3. Heptagram064

    Heptagram064

    Joined:
    Feb 22, 2022
    Posts:
    94
    Yes, i have never been too fond of normal based outlines, because they often leave artefacts. Thanks for your reply tho.
     
  4. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,362
  5. Heptagram064

    Heptagram064

    Joined:
    Feb 22, 2022
    Posts:
    94
    Ah, yes, i bet i could fit such into my usecase, thanks again.
     
    DevDunk likes this.