Goal: Selective Blending Ultimately, what I want to achieve is the ability to selectively blend different channels of the decal with the underlying material. Examples: A metal bolt overwrites roughness, normal, metalness (usually) and color (in most cases) values. A crack might overwrite normal information and maybe…
Optimization There are 3 areas of optimization I want to talk about. 1. Material pins: There are now two pins that deal with decal opacity: Opacity & MultiOpacity. How do they interact with each other? I decided to make it like this: If MultiOpacity is connected, the opacity will be read from this attribute, otherwise the…
I don't. That's just the way TAA works. But this should rarely be a problem, because most finer decals will be mip-mapped away long before any AA solution renders them invisible. And I gotta be honest with you guys, I don't see much of a chance for Epic integrating this into upstream UE. It adds small but significant…
@Menchen Thanks! I'm afraid what you suggest is still not enough. Not only because of the examples I posted above and the limitations you mention, but also because of the fact that opacity still has to determine the weighting of the blend. Let's say I have an opacity of 0 and the decal normal blends with the underlying…
==============================EDIT 2022-11-09============================== I'm cleaning up and consolidating a bunch of accounts, so the GitHub links in this thread will soon stop working. I have included my commits as patches attached to this post, so anyone still interested in this can take them and try to integrate…
@Hayden_Price You are very right, mesh decals will cause z-fighting when they are perfectly aligned with the underlying mesh. That's completely expected behavior, but I realize I failed to mention it anywhere, so that's on me. There is a line of code in the stock UE mesh decal shader that offsets the decal based on the…
So, there's good news and bad news. The good news is that I got selective blending to work with regular decals as well, and the performance impact is pretty minimal. The bad news is that the workflow differs a little from dbuffer decals and both implementations don't have feature parity. The most severe limitation is that…
@Menchen The multiopacity parameter has always been there. This is what I used as starting point for my changes to the rendering code. My guess is they started to implement proper multi opacity sometime in the past, but never finished it for some reason. All I did was kind of finishing it for them.
Looks like I'm done. The two screenshots below show the same decal before and after implementing multi opacity. In the first image opacity is 1 for the whole material. That's how it looks when the opacity pin is just left alone. The second image shows multi oacity applied, providing different opacity values for each…
@Nosslak Unfortunately, I don't. The code lives in this UE fork: https://github.com/POETindustries/UnrealEngine/tree/decals-plus and to use it, you would have to compile the engine yourself. I am very certain that I can't throw precompiled binaries of Unreal Engine around without unleashing the angry powers of Epic's…