Seamless gradient between different textures in the same material.


Code
if (z < 0.2) return lerp(a, b, z * 5);
if (z < 0.4) return lerp(b, c, (z-0.2) * 5);
if (z < 0.6) return lerp(c, d, (z-0.4) * 5);
return d;

You get the idea.

1 Like