Combininging different size textures in material

So I have two different resolution textures that I want to combine on a material, while scaling down one of the textures as well.

So if I had these two textures: (256x256 + 128x128)

I know how to combine textures using a LERP node, its just I’m not sure how I can scale down the one texture. I tried scaling the uv, but that resulted in the texture being repeated, even when I set the texture tiling method to clamped. Any ideas?

You’ve correctly approached it. You need to multiply UVs by certain number to scale the texture, and add some number to position it. To stop the texture repeating(or bleeding in case of clamped sampler), you need to additionally multiply alpha of LERP node by a mask, that would return 1 when small texture UVs are within 0-1 range, and 0 when outside. You can do this check with an if node, for example.

Thanks for that. A quick solution I found to my problem was adding some transparency to the borders of the texture. I’m guessing when you clamp it it takes the colors on the borders and uses that to fill the areas outside of the uv?

Here is my current setup: (edit I just realized I have an extra clamp in there, so I removed it)

210168-mat.png

However one slight issue I’m still having is if you zoom out really far, there is some slight bleeding that is occurring:
Do i need to do something with mipmaps settings or something to fix this?

210167-bleed.png

probably. there’s only going to be so much you can do with mipmaps as the texture size quarters everytime. i don’t know if you can set a lower limit on mipmaps but i believe you can turn them off in the texture compression settings. could also be a limitation of lerps though