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

transparency issue with hair

Discussion in 'Universal Render Pipeline' started by sgtkoolaid, Jan 25, 2022.

  1. sgtkoolaid

    sgtkoolaid

    Joined:
    May 11, 2010
    Posts:
    897
    hey I am having issues with my hair looking proper. looks like its alpha clipping or something not sure what the correct term is but visually it looks off. the texture itself seems to be correct so that doesnt seem to eb the probably no matter how "opaque" I make the texture part versus the transparency portion. take a look at the images I have provided and let me know your thoughts. I am using 2021.2.7f1 with the URP 12.1.2. thoughts on what could be causing this? i just loaded a new URp project and using this to set up my character but this is bothering me. not sure what the cause is. thank you in advance for your assistance.
     

    Attached Files:

  2. fleity

    fleity

    Joined:
    Oct 13, 2015
    Posts:
    289
    the hair does not get sorted correctly because it is transparent. HDRP offers more control in terms of how this can be solved (transparent depth pre / post pass)
    If I were you I would search for a urp compatible hair shader which manages this issue better than the default shaders.
     
    sgtkoolaid likes this.
  3. sgtkoolaid

    sgtkoolaid

    Joined:
    May 11, 2010
    Posts:
    897
    gotcha. I will look around for one.
     
  4. Jonas-Mortensen

    Jonas-Mortensen

    Unity Technologies

    Joined:
    Jan 3, 2020
    Posts:
    98
  5. sgtkoolaid

    sgtkoolaid

    Joined:
    May 11, 2010
    Posts:
    897
    i will look into it and see what happens and update
     
    Last edited: Feb 10, 2022
  6. sgtkoolaid

    sgtkoolaid

    Joined:
    May 11, 2010
    Posts:
    897
    there is no option to choose depth write in the lit shader I used.
     
  7. Jonas-Mortensen

    Jonas-Mortensen

    Unity Technologies

    Joined:
    Jan 3, 2020
    Posts:
    98
    Are you using shadergraph? The option is not exposed on the standard lit shader.
     
  8. sgtkoolaid

    sgtkoolaid

    Joined:
    May 11, 2010
    Posts:
    897
    I think I am using shadergraph, and I made a URP lit shader.
     
  9. sgtkoolaid

    sgtkoolaid

    Joined:
    May 11, 2010
    Posts:
    897
    which one do I make?
     
  10. Jonas-Mortensen

    Jonas-Mortensen

    Unity Technologies

    Joined:
    Jan 3, 2020
    Posts:
    98
    A lit shader graph should be correct. Can you screenshot the graph settings window you are seeing?
     
  11. sgtkoolaid

    sgtkoolaid

    Joined:
    May 11, 2010
    Posts:
    897
    i found it actually, i was using an older version of unity. however how to activate the surface options, and inputs?
     
  12. sgtkoolaid

    sgtkoolaid

    Joined:
    May 11, 2010
    Posts:
    897
  13. Jonas-Mortensen

    Jonas-Mortensen

    Unity Technologies

    Joined:
    Jan 3, 2020
    Posts:
    98
    You need to create texture properties, sample them in the node editor and connect them to the inputs. That way they will show up on materials using that shader. I recommend reading the documentation for a more in depth explanation. Especially the "My fist Shader Graph" section.
     
  14. sgtkoolaid

    sgtkoolaid

    Joined:
    May 11, 2010
    Posts:
    897
    ill take a look at it and get back to you. thank you for the documentation.
     
  15. As_day

    As_day

    Joined:
    Nov 21, 2013
    Posts:
    3