Texture bombing unusable with height blended landscape layers?

Has anyone tried this and got it to work? It’s complaining about DDX and DDY nodes used in the texture bombing function.

Anyone? I’ve been trying to recreate the texture bombing function as outlined here ( but I’m not having much success.

What specifically is returning the error? That should only happen if you are trying to do something in the vertex shader like displacement or world position offset with it.

If that is the case, you will need to edit the function in two places. First in the main function itself, change all these heightmap samples to use None for the mip value mode:


And then you will need to do the same thing to 1 more texture sample in this function:


This may cause slight aliasing artitfacts on the edge of tiles.

Hi @RyanB
I tried what you suggested. There is this error though:" failed to cast float 2 input to static bool type UE4", indicated at the level of the TextureBomb_SingleSample.
Is there something else then I must do to make it work with displacement?

First. The post is 5 years old…
Second. I seriously doubt Ryan Brucks has time for the forums…

read over the message a few times.
it’s telling you that you are attempting to use a float 2 paramrter instead of a static boolean value.

Static boolean expects 0 or 1 (true or false).
probably has to do with whatever you changed. A screenshot would help.

Hi [USER=“3140864”]MostHost LA[/USER]
Pardon my ignorance, I am quite new still to UE4. It thought it was worth a shot.
Of course, here are some screenshots of what I did and the context my Mat Function is used.
I did try to look for any place where I might have plugged a float 2 in a bool but I couldn’t find anything.


Beside renaiming it to “Texture Splattering” , I did change in the main function the 3 heightmap samples to use None for the mip value mode and I did the same for the MaterialFunction “TextureSplatter_SingleSample” inside it.

Review this one

The material function has all the pins marked as
(S) for scalar
(B) for bool
(T2d) for the texture

The IsNormal? should be a bool.
It’s the only bool I see, and the function that is raising the error. but the screen cuts off the value…

Btw, Your own sanity might appreciate better function naming.
Having TextureSplatter_SingleSample inside TextureSplatter is just confusing. For log / error message purposes.

You should probably precede material functions with MF_ and avoid ambiguous names like Texture, Texture Sample, Normal. etc. All things that you could potentially have 10 of in the same material, on top of existing functions :stuck_out_tongue_winking_eye: