unity-game-enginegame-enginegame-developmenturpdecal

The alpha of decals is not completely transparent in Unity


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 here a "square" around the blue circle in the picture (I marked with red the full decal and with orange what should be fully transparent).

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

This is my material: Material used for the decal

This is my texture: Texture used in the material of the decal

This is the object with the URP Decal Projector: Configuration of the GameObject casting the decal

Does anybody know why this happens?


Solution

  • I found the solution by switching the "Automatic" technique of the decals in the Forward Renderer to any other. I opted for the "Screen Space" since in the documentation seemed better: https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@12.0/manual/renderer-feature-decal.html#:~:text=Feature%2C%20Inspector%20view.-,Technique,-Select%20the%20rendering

    enter image description here