I got stuck on an issue for a good hour now, maybe anyone knows what am I missing? I am trying to create a generic “blend object with landscape” material based on mesh vertex color, and I have a material function which blends input textures with world oriented landscape textures. All works well except for normal input:
When blending the original normal only (A), everything looks good. But I can’t have a hard-coded sample in a function that’s supposed to be used in different materials with different normals tho, so I thought to replace it with an input which I then sample (sampler set to normal) and blend with landscape’s world aligned normal. The result of the input (B) is all kinds of screwed up.
Am I doing something wrong in the setup? Replacing the B input with param removes the issue, but then I can’t use the function inside other materials as param is accessible only in instances.