Search Unity

The alpha of decals is not completely transparent.

Discussion in 'Universal Render Pipeline' started by gillemp, Jun 29, 2022.

  1. gillemp

    gillemp

    Joined:
    Nov 23, 2015
    Posts:
    81
    Hi!

    I wanted a quick way of displaying the range of stuff in my game, so I thought: do it with decals around it! Fast and easy!

    However, the parts of the decals that are transparent do not appear completely transparent during gameplay. They darken or lighten the parts they are on top of.

    You can clearly see a "square" around the blue circle in the picture (I marked with red the full decal and with orange what should be fully transparent).
    2 in 1.png

    The decal is a blue circle and the corners of the .png are fully transparent: TextureEnergyRange.png

    This is my material: upload_2022-6-29_10-53-23.png
    This is my texture: upload_2022-6-29_10-53-52.png
    This is the object with the URP Decal Projector:
    upload_2022-6-29_10-57-20.png

    Does anybody know why this happens?
     
  2. gillemp

    gillemp

    Joined:
    Nov 23, 2015
    Posts:
    81
    -chris, Njecolina and SomeGuy22 like this.
  3. SomeGuy22

    SomeGuy22

    Joined:
    Jun 3, 2011
    Posts:
    722
    This just saved me, thank you so much! Confirmed that the "DBuffer" and "Automatic" decal techniques seemed to produce that awful transparency for me too, but switching to Screen Space did the trick!
     
  4. faltek

    faltek

    Joined:
    Feb 2, 2021
    Posts:
    4
    That did it! Thank you!
     
  5. finnhax

    finnhax

    Joined:
    Dec 20, 2017
    Posts:
    1
    Setting it to Screenspace distorted the colors for me.
    The real fix is to set NormalBlend to 0 if you don't set a normal texture
     
    Lucafro likes this.
  6. Serinx

    Serinx

    Joined:
    Mar 31, 2014
    Posts:
    788
    Thank you! Screenspace for decals worked for me. The annoying thing is it was working fine with automatic then suddenly decided to play up, knew it had to be a graphics setting somewhere.
     
  7. Morrow_Spm

    Morrow_Spm

    Joined:
    Feb 2, 2021
    Posts:
    1
    upload_2023-7-7_19-18-44.png
    I have the same problem. If I open "Shader Graphs/Decal" Shader => the "Main Preview" is white and "Normal Alpha(1) is gray. How can I fix this?