Layered material and splat map

Hi, I am not sure how to use a splat map (with height information packed into each RGB channel) and Layered Materials.
In earlier versions of the engine, the LandscapeLayerBlend node could be used to blend splat map channels through its height input, which was obviously wrong, but was working. This is not possible anymore, but what is the replacement ? I don’t want to use separate height maps and assign them to landscape layers, I need to use a layered material, i.e. a single material that will paint areas based on a splat map.

Answering my own question in case it helps other:
The blend between parts of the layered material using a splat map can be made using a LinearInterpolate node. For example, to blend two textures based on a splat map, connect the two textures to the A and B input of the Lerp node, and the appropriate splat map channel to the Alpha input.

Hey thanks for providing this solution. Did you come across another solution by any chance as well? Because for me the LinearInterpolate function doesnt provide the exact colouring. It seems like all colours are being interpolated with each other not just assigned to the respective RGB value.

This is probably because your splatmap channels have levels of gray. Your channels must use two colors only (i.e. black&white) if you want a real mask that is clearly separating what should be masked from what should not be.

okay just for understanding maybe thats a stupid question: when i load the splatmap with its rgb colours directly on the landscape, the colours seem to be more vivid. when i load the splatmap with the same colour assignment via the lerp node they are a bit “weak”. The positioning of colours is perfect though. is it normal? or do i make sth wrong?