Possible to blend 2 different textures based on camera distance falloff?

Hi Guys

Is it possible to blend or swop between 2 textures based on camera distance? As in directly in Shader Graph in the editor, not using any runtime code?

I have a lowres texture I want to use at far distances and when coming closer, I want to blend to the more detailed highres texture.

The 2 textures are not different resolutio versions of each other, but more 2 different textures entirely

You should be able to do this with the position field in the camera node. In broad strokes… Do a distance check between the camera position and your fragment position, inverselerp the result with your desired effect distance and multiply it with your texture. Then add the two textures together. I’ve done a similar effect but combined the base texture with a detail map.

1 Like