How to apply a UV multiplier to Vector3 material node?

I’m working on a material function for using a parallax in my landscape material.

My parallax material function applies several UV multipliers to the height map I pass into it. Currently I pass in a Texture2D and hook it into a TextureSample node, so that I can plug it whatever UV multiplier i like. Example:
image
And results in my testing are looking pretty good:

The trouble I’m having is I want to pass the output of a LandscapeLayerBlend node as the input for the height map (which would be a Vector3 I believe). However I’m not how then to apply a UV multiplier to Vector3 (as I can’t plug a Vector3 into a TextureSample node, which has the UV input I need). Example:
image

So basically I’m asking: How can I apply a UV multiplier to a Vector3 node?

Thanks in advance.

you can’t, it doesn’t work that way.

anything that modifies UV coordinates need to be applied to said UV coordinates which are used to sample a texture. i.e. always hooked to a texture sample’s UV input.
this is because UVs are just a 2D coordinate of the texture that will be read by the current pixel (for all pixels), so modifications to the UVs just tell that pixel to read from a different place of the texture.
TL;DR altering UVs only work for sampling textures. if the texture is already sampled (which means you already have a resulting color aka. Vector3), you can’t just “shift the position” of it.

what do you hope to achieve that you’d want to use the output of a LandscapeLayerBlend node?

Hi @Chosker.

I’ll try to explain why/what I’m trying to achieve: I have a material function that adds a parallax effect to my material. On a single material I would use it like this:

However it is fairly expensive and uses quite a lot of instructions. So I currently can’t use it on my landscape material (on all layers) as I would need to use the function for every individual layer (mud, grass, rock, etc).

Which is why I would like to use the LandscapeLayerBlend nodes, to feed in the params for all layers, and then pass the output to a single ParallaxUV function (so I would only need one ParallaxUV function).

This is a rough example of what I would like to do in my landscape material:

Currently I’m not able to do this as I can’t pass the result of LandscapeLayerBlend into the Texxture2D heighmap input on my parallax function.

I hope that makes sense…

You still need to parallax each layer’s textures individually, there’s no way around that

Hmmm, this is very unfortunate, because the effect looks so great.