x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

[Closed] 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?

Decal vs. Lit Materials

Decal vs. Unlit Materials

Product Version: Not Selected
Tags:
decalvslit.png (3.2 MB)
decalvsunlit.png (2.5 MB)
more ▼

asked May 22 '16 at 07:09 PM in Rendering

avatar image

Answers.Archive STAFF
1.9k 197 306 679

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

The question has been closed May 22 '16 at 07:10 PM by AndrewHurley for the following reason:

The question is answered, right answer was accepted


1 answer: sort voted first

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:

Test

Thank You

Eric Ketchum

decaltest.jpg (208.4 kB)
more ▼

answered May 22 '16 at 07:09 PM

avatar image

Answers.Archive STAFF
1.9k 197 306 679

avatar image Answers.Archive STAFF May 22 '16 at 07:09 PM

Thank you for your swift response!

Regards,

Theo

avatar image Answers.Archive STAFF May 22 '16 at 07:09 PM

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

avatar image Answers.Archive STAFF May 22 '16 at 07:09 PM

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?

avatar image Answers.Archive STAFF May 22 '16 at 07:09 PM

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

avatar image Answers.Archive STAFF May 22 '16 at 07:09 PM

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:

Strange Behaviour on SM ES2 in the editor

The behaviour is not present in the mobile preview.

Regards,

Theo

boxdecals.png (1.2 MB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question