Search Unity

Question Why decals can't override emission to a lesser value?

Discussion in 'High Definition Render Pipeline' started by Passeridae, Jul 27, 2021.

  1. Passeridae

    Passeridae

    Joined:
    Jun 16, 2019
    Posts:
    395
    Hi!

    Say, I have a surface with a standard Lit shader and some emission value and color. Now, when I apply a decal to it, it can only add its exposure intensity and color to it. But it can't subtract from it.
    What I want is to have an emissive surface and a decal which makes a part of it less emissive (or completely non-emissive).
    Is it impossible by design or some additional settings are needed?
    Thanks!
     
  2. chap-unity

    chap-unity

    Unity Technologies

    Joined:
    Nov 4, 2019
    Posts:
    766
    Unfortunately Decal emissive is additive only and it's done in a separate pass.
    The reason it can't be subtractive is because negative blending is not supported by all color buffer format (like R10G10B11, the one used by default). So it's not allowed for technical reasons.

    Thanks for bringing this up, it will be added to the documentation at least !
     
  3. Passeridae

    Passeridae

    Joined:
    Jun 16, 2019
    Posts:
    395
    Thanks for the explanation and docs update!
     
    chap-unity likes this.