Search Unity

[Resolved] Decal Projector duplicates decal when parameters tweaked

Discussion in 'High Definition Render Pipeline' started by Alaiing, Jan 31, 2020.

  1. Alaiing

    Alaiing

    Joined:
    Nov 17, 2012
    Posts:
    15
    Hi!

    This issue came up in another thread and since I could reproduce it with a blank HDRP project I thought it deserved its own thread.
    When using a Decal Projector, if you tweak "Fade Factor" (for instance), most of the time the decal is duplicated and will be displayed indefinitely, until you enter play mode. It even remains if you switch scenes.

    On the screenshot below, I tested it with the example scene of an HDRP blank project:
    I added a Decal Projector, created a new Material using the HDRP/Decal shader, used one of the exemple's textures (Spotlight_Cookie) as Base Map and changed the color to green (for better visibility).
    Most of the time, slightly changing de Fade Factor of the Projector creates a duplicate decal. It's totally independent from the decal projector and is only affected if a change is made to the material itself. It's not bound to any game object. As someone said in the other thread, it looks like it's "baked" in the rendering pipeline.
    upload_2020-1-31_15-12-24.png
    Entering play mode makes it disappear but it's very easy to reproduce.

    Given it's a blank project I assume it's a bug, but maybe I did something wrong somewhere.. :/
    It was made in Unity 2019.3.0f6 + HDRP 7.1.8

    Anyone care to try and reproduce it as well ?

    I came up with this issue in my own project, where I got many decal artefacts like this while turning decal projectors on and off (typically to display/hide the range of a cannon). In my case it's even different, the decal artefacts are snapped at position (0,0,0).

    Hope this gets sorted!
    Cheers.
     
    Last edited: Jan 31, 2020
    BATTLEKOT likes this.
  2. Bordeaux_Fox

    Bordeaux_Fox

    Joined:
    Nov 14, 2018
    Posts:
    589
    Hello,

    yes I reported that bug also on my own some weeks ago, Unity knows about it. The fix will come with HDRP 7.2.0. which will be released next week. I'm also waiting for it to be fixed for months because my game makes use of decal projector, also for gameplay aspect.
     
  3. Alaiing

    Alaiing

    Joined:
    Nov 17, 2012
    Posts:
    15
    That's great news! Thanks for the heads up!

    I couldn't find it on the issue tracker though... do you happen to have a link to it?

    Cheers.
     
  4. Bordeaux_Fox

    Bordeaux_Fox

    Joined:
    Nov 14, 2018
    Posts:
    589
  5. Alaiing

    Alaiing

    Joined:
    Nov 17, 2012
    Posts:
    15
    Awesome! Thanks. :)
    (it's weird that it didn't come up when searching for "decal" in the issue tracker...)
     
  6. Bordeaux_Fox

    Bordeaux_Fox

    Joined:
    Nov 14, 2018
    Posts:
    589
    Yes, it's hidden because it was submitted by Unity staff. They do not like to admit it.
    But I know the truth since the early days of HDRP. :p
    I'm really unlucky that the bug, that destroyed my game the most, is fixed as one of the last in preview cycle of HDRP ...
     
  7. Alaiing

    Alaiing

    Joined:
    Nov 17, 2012
    Posts:
    15
    So HDRP 7.2 is out and the problem seems to be solved!
    In my case, no more residual decals. :D
     
  8. Bordeaux_Fox

    Bordeaux_Fox

    Joined:
    Nov 14, 2018
    Posts:
    589
    Yes, I updated my example project I used to submit the bug case. It works now! Finally, after months of pain with the decal component. So changing the transform and the material works now without a ghost copy.
     

    Attached Files: