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. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Unity HDRP Transparency showing through solid texture

Discussion in 'High Definition Render Pipeline' started by Slack43, Aug 3, 2019.

  1. Slack43

    Slack43

    Joined:
    Dec 23, 2015
    Posts:
    68
    Hi, i have a material with some transparency in it. When i apply this material to the object i get some weird effects like on the screenshot below. Screenshot_18.png Screenshot_19.png
    This is how my texture looks:
    Capsule1_0_AlbedoTransparency.png
    Im using the newest version of HDRP
     
  2. iSinner

    iSinner

    Joined:
    Dec 5, 2013
    Posts:
    174
    Try changing the sorting for the transparent object to be back to front, it looks like that could solve the issue.
     
  3. Slack43

    Slack43

    Joined:
    Dec 23, 2015
    Posts:
    68
    If You mean in the hierarchy i can't because the base and the transparent cylinder aren't separated they are the same object only the sphere inside is a separate object.
    If you mean the option in the material it doesn't change anything.
    Screenshot_20.png
     
  4. Remy_Unity

    Remy_Unity

    Unity Technologies

    Joined:
    Oct 3, 2017
    Posts:
    504
    I greatly suggest that you separate the transparent and opaque parts of the object into individual materials.
     
    olavrv likes this.
  5. IIMakII

    IIMakII

    Joined:
    Mar 12, 2019
    Posts:
    1

    did u get it working as i am having same issue too
     
  6. pepperj81

    pepperj81

    Joined:
    Jul 14, 2015
    Posts:
    1
    upload_2021-3-1_11-38-18.png

    Hey guys.. i was having this issue too. I had a grouped objects.. one part was transparent and the other was opaque. My "Depth Test" was set at greater which caused the opaque to have transparency. I switched to "LessEqual" and it corrected.. No explanation why, but it worked for me.
     
  7. FutureWang

    FutureWang

    Joined:
    May 24, 2018
    Posts:
    22
    Hi, Remy, is there any way to let a transparent object not transparent self, but transparent backageground in HDRP. I use shader graph to make a fresnel shader, used to show a man. But if the man rotates, I can see the other side leg and arm on the front side. It is not what I need.I think maybe a stencil buffer will help to fix this. But I don't know how to use this in shader graph. Can you help me?
     
  8. Remy_Unity

    Remy_Unity

    Unity Technologies

    Joined:
    Oct 3, 2017
    Posts:
    504
    AFAIK, shadergraph doesn't support stencil buffer. For you case, I think that enabling "Transparent Depth Prepass" would fix the issue.
     
  9. unity_FF06D407EF45CD81FCBD

    unity_FF06D407EF45CD81FCBD

    Joined:
    Sep 23, 2021
    Posts:
    1
    I got a fix:

    upload_2022-9-22_14-25-38.png

    Before:

    upload_2022-9-22_14-25-53.png

    upload_2022-9-22_14-26-21.png

    After:

    upload_2022-9-22_14-27-6.png

    upload_2022-9-22_14-26-49.png