How can I stop texturing from compressing the tiles?

I think this is kind of hard to explain, so the best way to show you what I’m talking about is by using a picture:


The texture there is all screwy because it got squished, since that side of the cube is smaller. (Those are actually two cubes pressed together, both with smaller sides, it’s a randomly generated dungeon… not that it matters much for this). Is there any way to prevent Unity from squishing the texture together here? I’ve tried using shaders (I definitely can’t write my own shader) to map one texture across the entire game world, then just use that where needed, but I don’t think that really works in a 3D world.

I think what needs to happen is Unity needs to be told to always keep the texture the same size, then just apply it where it’s needed, whether it uses a full tile or not. I don’t know if that’s possible to do, but it would suit my purposes just fine.

Either way, I basically just need a way to stop the texture from getting squished on the smaller sides of the cubes. Is there any way I can achieve this or something like it? Thank you in advance for any help offered!

Try working with a tri-planar shader instead of the normal diffuse one.
You can find the code for one here: Radiator Blog: A smoother triplanar shader for Unity.

It also allows you to customise the textures on each side of the cube, that’s why I use it a lot.