Making a material that auto-tiles a texture
I have a texture that's getting applied to a lot of differently sized objects while keeping the same resolution on the texture, as seen in the image below. It's set up such that a 20x20 block will get the whole texture applied, and anything smaller has fractional tiling. To do this, I had to create 9 different materials (1to1, 2to1, 3to1, 4to1, etc.) with the same texture and different amounts of tiling (.05, .1, .15, .2, .25, etc.). I've also created lots more for other objects with different ratios (5:4, etc.). Even when the ratios are technically the same (4:2 vs. 2:1) I've had to make unique materials for each one because the 4:2 needs to be twice as tiled as 2:1 to look uniform, or else i get the stretching seen in the following image So I've just manually created materials each time where one unit on the object corresponds to .05 tiling on that axis. And I've made so many. Is there a way, potentially through a custom shader (that works with the latest version of unity), that would automatically tile the texture to fit whatever it's on so that I could just have one material and apply it to all objects using this texture?
Your answer
Follow this Question
Related Questions
Get UV warped texture as another texture 0 Answers
Stop the same material from stretching differently on different objects 2 Answers
Can I tile a material differently on different objects instead of making a new material? 0 Answers
Unity Field Of View Visualisation Transparent Texture Problem 0 Answers