I have created a Material that contains Material Layers used to color the surface of a Landscape. I am using UE 4.26.2.
One of the layer provides a color based on the slope of the terrain, while another is used to display lines at configurable interval and line width to create a grid.
The Material Layer used to display the grid makes use of a Material Function that computes the color based on the WorldPosition : it outputs a color (green) with an alpha component of 1.0 for locations that fall on lines, and 0.0 otherwise.
The Background Layer is simply a material layer with a uniform color (white).
The problem I have is when I blend these layers using an alpha value for the layer (I am using the BlendMaterialAttributes function as part of the Blend Asset for each layer) : The transparent sections of the grid line Material Layer do not show the underlying layer (the one based on slope).
I have tried playing with the opacity and opacity mask of the material Attibutes returned by the grid Material Layer, but it does not change the behaviour. Do I need to implement a custom function to blen the MaterialAttributes of the layers ?
Thanks in advance !