Deffered Decals on Unlit Materials

Deferred decal actors seem not to appear on surfaces that have unlit materials.

In the screenshots here we have a decal actor and two boxes. One box has a lit material on it. The other one switches from unlit to lit.

I wonder if this is a known issue? If it is an issue, is there a timeline on when it might be resolved (if possible)? If it isn’t is there a way we can cast decals on Unlit materials that I am perhaps missing?

Hi Theo -

This behavior is expected as Unlit means that no shader computation is done and as decals modify those shading attributes you would not see any effect.

You can achieve the look of an unlit material while keeping the shader computations by assigning a zero to Base Color and Specular and your default texture or color into Emissive Color.

Here is an example:

Thank You

Eric Ketchum

Thank you for your swift response!

Regards,

Theo

Thanks again for your swift reply to my previous question. On a related note, I recently noticed that deferred decals are working on unlit materials in the mobile preview and on our device but not in feature level ES2 in the editor.

So this brings to mind a few further questions:

Is this intended behaviour?

If so, does this mean we are not getting the performance benefits of having unlit materials and the lit material pipeline is actually in effect on the device (seeing as shader computations must be being done if the deferred decal is modifying something)?

If not, can we expect a change in behaviour down the line?

Regards,

Theo

On ES2 path decals are rendered on top of all geometry that writes to depth buffer. So it should work for all materials except translucent ones. Unlit materials are still cheaper on device.

I recently noticed that deferred
decals are working on unlit materials
in the mobile preview and on our
device but not in feature level ES2 in
the editor

Editor feature level ES2 uses the same path as Mobile Preview, does it happen only with unlit materials?

Thank you for your reply.

It appears that I was mistaken. The behaviour I described earlier is not reflected now. Decals appear on lit and unlit opaque materials in feature level es2. On masked materials, for a few tests they appeared only if there is an opaque object behind them. Subsequently they appear on the pixels that are not masked (which is awesome). On Translucent materials they don’t show up (as expected). The graphics programmer and I were pretty sure of the behaviour before but it can’t be reproduced now. If we see anything in the future we’ll let you know.

Regards,
Theo

I managed to observe it failing again. I’m a little bit relieved because it means I’m not hallucinating XD

So in this image you can see the decal is being projected onto the unlit material, but it is showing only where the box with the lit material is interpenetrating it:

The behaviour is not present in the mobile preview.

Regards,

Theo

Hi Ben,

I’ve made our Game Director aware of your request and I will let you know when I know what his thoughts are. On my side, I would be delighted to help the users of AnswerHub pending his approval.

Regards,

Theo

Hi Ben,

I’ve received authorization for that. Feel free to pare down the responses to be more clear. Also, if you require us to create a new topic that’s more clean, we’d be happy to do so.

Theo.