Hello, so I created a material I would like to use for my ground-based surfaces, roads, sidewalks, etc. This material is setup to blend with a function that covers it with snow, based on a value in an MPC. I would also like to display decals on my streets/sidewalks/etc, but I would like the snow to essentially cover them as well. Is this possible? If so, how would one go about it? I don’t really need general instructions or anything, just a theory as to how it could be done.
Pretty sure this would require custom decal response.
The idea is that rather than drawing the decal directly, you can sample the dbuffer in your ground material. This allows the decal receiving material to control how the decal is blended. In other words, you could give the decal an inverted version of your snow mask so it won’t show up anywhere that the snow does.
Oh, I forgot to mention that this is an Unreal Engine 4.26 game that I am working on, so I am somewhat restricted. The feature in the video has been added into Unreal Engine 5 from what I understand.
Yeah I think you’re right - it was a recent addition. In 4.x it would be a bit harder, you’d need your decal material to have access to the snow layer somehow. If the snow layer is relatively static (like landscape layer paint), runtime virtual textured could accomplish this, or of the snow mask is procedurally generated, you could reconstruct it in the decal material too.
Yeah that’s the solution I settled on too for now. My snow coverage is essentially done in an MF that takes in the base MA and applies coverage, just tied it in to the decal material too, and it does work.