Texture Scale

Basically what I would like to achieve is something like the minecraft item frame where you have a generic border with an object inside it and I want to be able to swap out the object inside it without having to recreate the border. To go about this I started off with a material containing two texture samples, one for the border and one for the item to go within the border. Then I figured I would instance that material and drop the item in as the parameter.

The problem is that the item goes edge to edge and bumps into the border. What I would like is a nice way to scale that item texture down just a bit so it fits inside the border nicely. How do I do this?

I have tried to use the ScaleByCenter and scale it down but then the texture starts to tile. My guess would be I need to get the texture to not tile but I don’t know how to do that. I tried a clamp but that smears the texture outside of the clamp area.

Any tips at all would be greatly appreciated.

As soon as I post this I figure it out… After 3 hours of playing around with this it turns out that it’s as simple as not making the texture go to the edge of the image as you’re making it. Simple as that.

I had a 256x256 texture and the image was edge to edge. If you move it off the edge a bit and then scale/clamp it works just fine.