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"

Decal sharp edges

Hi. Is there any way to control sharpness of decal component's edge?

alt text

Product Version: UE 4.12
q.png (630.6 kB)
more ▼

asked Jul 07 '16 at 04:17 AM in Rendering

avatar image

250 20 19 34

avatar image LordDarkhan Jan 08 '18 at 11:04 PM

My options are to: 1) Necro an existing dead thread, or 2) Post a new thread with an existing question.

I chose to necro. I am also wondering if anyone knows how to work around this. I need sharp edges on my decal along all three axis. Anyone have any thoughts?

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

1 answer: sort voted first

Although two years have passed, I still decided to answer this question to help latecomers who have encountered this problem. Modify this line in DeferredDecal.usf(line 288 in 4.19)

     // Z fade
     Opacity *= saturate( 4 - 4 * abs( SwizzlePos.z * 2 - 1 ) );


     // Z fade
     Opacity *= 1;

more ▼

answered May 15 '18 at 03:02 AM

avatar image

13 1 2 4

avatar image LordDarkhan May 15 '18 at 03:36 AM

Two years later or not, it's only four months after I needed it, and I still do. I'm going extend this DeferrerdDecal tomorrow so I can implement both.

Thank you so much!

avatar image LordDarkhan Jun 13 '18 at 12:47 AM

Ok, this has been working for a while now, but I'm going to complicate the question. In most cases, the old decal functionality is what I want. In a few VERY SPECIFIC and important cases, I need the modified functionality. How could I go about adding a flag for the decal to choose the correct render method? I'm not familiar with how the .usf code interacts with the .cpp code.

I assume I need to modify/extend DecalComponent for the user to be able to actually modify the flag, but I can't for the life of me figure out how the two interact, or through what chain they communicate.

Think you can point me in the right direction, IOchair?

avatar image IOchair Jun 22 '18 at 02:56 AM

It may be very difficult to add an extra editor control. But giving up some of the existing functionality and replacing it with the features you want is simpler. For example, you can replace the original fade screen size with a constant in the shader. Then use the original fade screen size variable to control the decal edge fade

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

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

Answers to this question