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

Decal Shader looks weird on surface when using a normal map

Discussion in 'Universal Render Pipeline' started by theMasky, Apr 15, 2022.

  1. theMasky

    theMasky

    Joined:
    May 8, 2015
    Posts:
    124
    Hi!

    Uh, so, I really don't know what's the issue here, I'm not sure if it's expected behavior, but the problem is that the Decal Shader is producing some weird artifacts as you can see on the image below:

    decal.png

    I tried with both Decal Projector and a quad game object.

    I thought it might be the normal texture itself, but the documentation never mentions anything regarding any required configuration or settings for the normal map. In fact, they used two different normal textures as examples (as seen here and here)

    Changing the Decal Renderer Feature from Automatic to Screen Space seemed to fix the issue, but normal maps aren't working on that mode. Also lowering the normal blend size but of course, if I left it at zero then the normal map wouldn't be visible.

    I'm using Unity 2021.2.19f1 with URP 12.1.6
    In fact, I was facing this issue since Unity 2021.7
     
  2. theMasky

    theMasky

    Joined:
    May 8, 2015
    Posts:
    124
    Ahh shoot! forgot to mention something that I think it's really important: I'm using Deferred rendering path, NOT FORWARD!
     
  3. PhiMue

    PhiMue

    Joined:
    Sep 21, 2013
    Posts:
    7
    I have the same problem, only the area around the decal is too bright. Using forward renderer.

    Screen Space works and can use normal maps, as far as I can tell, but this leads to flickering in VR. It also doesn't look very good on surfaces that are not flat, because they no longer appear to be smoothed properly, so you can see the individual triangles.

    I can probably do without decals, but if there is a fix for this problem, please let me know.
     
    theMasky likes this.
  4. theMasky

    theMasky

    Joined:
    May 8, 2015
    Posts:
    124
    Hmmm, I haven't try decals on the new LTS version (2021.3), maybe it's working there. I'll give it a try and see if it works now.
     
  5. PhiMue

    PhiMue

    Joined:
    Sep 21, 2013
    Posts:
    7
    No, I'm using 2021.3 as well. But I can do without normal maps, if necessary.
     
  6. theMasky

    theMasky

    Joined:
    May 8, 2015
    Posts:
    124
    Oh that's quite disappointing. Maybe it has to do with our GPUs?

    From Decal Renderer Feature | Universal RP | 13.1.8 (unity3d.com)
     
  7. PhiMue

    PhiMue

    Joined:
    Sep 21, 2013
    Posts:
    7
    Unlikely. However, it turns out that I probably can't use them, after all, because currently they render over everything, including any dynamic objects in front of the projectors. Supposedly this will be fixed in 2022.2, but I can't wait for that and also don't want to update while working on the current project, which is on 2021.3.