Search Unity

HDRP Decals - materials still receiving decals when they shouldn't

Discussion in 'High Definition Render Pipeline' started by nehvaleem, Sep 8, 2019.

  1. nehvaleem

    nehvaleem

    Joined:
    Dec 13, 2012
    Posts:
    438
    I have question considering decals in hdrp. I've created shader with shadergraph using Decal Master node. It is working pretty well overall but I've encountered really annoying thing. Shader used by the decal is using emission - the problem is that despite the fact that some of the materials have "receive decals" option turned off they still receives emission from that decal. Is it a bug?

    I am using HDRP 7.1.0 with unity 2019.3.0b2. Materials that are affected by decal's emissive property are HDRP/LIt (I haven't tested with others)
     
    Last edited: Sep 8, 2019
  2. Lunaticchimp

    Lunaticchimp

    Joined:
    Jan 21, 2014
    Posts:
    1
    I would also like to know. I'm getting the same result with Unity 2019.2.4f1 and HDRP 6.9.1.
     
  3. MartinWorker

    MartinWorker

    Joined:
    Feb 24, 2015
    Posts:
    12
    Same problem with 7.1.2 HDRP, It happens when the decal emission is enabled.
     
    Last edited: Nov 17, 2019
  4. Vita-

    Vita-

    Unity Technologies

    Joined:
    Jul 2, 2019
    Posts:
    121
    Hello, the issue you face is by design of how we decided to support emissive decals because of the limitations of current features. Currently, there are no plans to develop a feature where the materials are not affected by decal's emission when Receive Decals property is disabled.

    Regards,
    Vita
     
  5. hertz-rat

    hertz-rat

    Joined:
    Nov 3, 2019
    Posts:
    71
    I use emissive decals because otherwise they 100% vanish when in shadow. If I disable the emissive tag, how can I get them to render when under shadow?
     
  6. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    934
    From memory, what you experience was an issue. Which version do you used?
    2019.3 + 7.1.8 have this working.
     
  7. hertz-rat

    hertz-rat

    Joined:
    Nov 3, 2019
    Posts:
    71
    By coincidence, I updated to 2019.3 an hour ago. You're right, it seems to be working now. Thanks to whomever is responsible
     
  8. Ginawa

    Ginawa

    Joined:
    Jul 14, 2019
    Posts:
    1
    No idea how is working for you, i am using 2019.3.13f HDRP 7.3.1 and still when i disable "receive decals" on my material, my material still gets the decal projection as emission.

    So if this is not going to be fixed, how we can disable the "receive shadows" for the HDRP/Decal Shader? If we dont want our Decal to get shadows??
     
  9. SebLagarde

    SebLagarde

    Unity Technologies

    Joined:
    Dec 30, 2015
    Posts:
    934
    >No idea how is working for you, i am using 2019.3.13f HDRP 7.3.1 and still when i disable "receive decals" on my >material, my material still gets the decal projection as emission.

    Hi, it is not the same issue. Here "Receive decals" is indeed not take into account for emissive decal. There is work to fix this in 2020.2. Sadly not backport plan as it is not a trivial fix.
     
  10. Wes_VirBELA_Dev

    Wes_VirBELA_Dev

    Joined:
    Nov 11, 2018
    Posts:
    3
    Just checking in to say this is still an issue in 2020.2.0b9. If I set a material to not receive decals, I would expect that it should, y'know, not receive decals. ;)
     
    nehvaleem likes this.
  11. pbritton

    pbritton

    Joined:
    Nov 14, 2016
    Posts:
    160
    This issue still exists with 2020.3.2f1 :(
     
  12. mons00n

    mons00n

    Joined:
    Sep 18, 2013
    Posts:
    304
    Did this issue ever get resolved? Running into it on 2021.3.8f1 HDRP 12
     
  13. adrien-de-tocqueville

    adrien-de-tocqueville

    Unity Technologies

    Joined:
    Mar 16, 2020
    Posts:
    270
    The Receive Decals property of Materials does not affect emissive decals. HDRP always renders emissive decals unless you use Decal Layers, which can disable emissive decals on a Layer by Layer basis.
     
  14. mons00n

    mons00n

    Joined:
    Sep 18, 2013
    Posts:
    304
    Ah I see. How does one disable emissive decals for a specific layer? I don't recall seeing that option when using Decal Layers.

    In my case I am attempting to render my ground targeting reticle (which is emissive) on everything except for my players and enemies. I tried enabling decal layers, then setting my targeting reticle to only render to a specific decal layer but the emission from this decal renders onto everything. If I disable emission on the decal it works as I would expect (but obviously has no emission).
     
    Last edited: Sep 21, 2022
  15. adrien-de-tocqueville

    adrien-de-tocqueville

    Unity Technologies

    Joined:
    Mar 16, 2020
    Posts:
    270
    I've tried to make a simple setup to showcase it. The emissive decal is set to affect decal layer 1 only so it only affects the mesh renderer on the right.
    Maybe decal layers are disabled in your hdrp asset or in the framesettings (in the HDRP global settings, or per camera) ?

    upload_2022-9-22_11-2-16.png
     
  16. mons00n

    mons00n

    Joined:
    Sep 18, 2013
    Posts:
    304
    I just did some local testing and what seems to be happening is that the material has to have "Receive Decals" checked in order for the layers to be respected. But hey, it works!
     
    adrien-de-tocqueville likes this.