Hi. Is there any way to control sharpness of decal component’s edge?
My options are to:
- Necro an existing dead thread, or
- 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?
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!
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;
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?
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