I created an asset that I want mirrored on repeat. I assumed setting the Wrap Mode to “Mirror” and Sprite Renderer Draw Mode to “Tiled”, but I’m just getting a basic repeat.
The Unity docs say that the Mirror option “Tiles the texture, creating a repeating pattern by mirroring it at every integer boundary.”
Here’s some pictures that show my configs and result.
So the docs say that Tiled mode is actually a 9-sliced version of the sprite that preserves the corners and is then tiled elsewhere. This seems to be a tiling of the UV space, so it’s not extending beyond the 0-1 UV space resulting in the texture’s repeat mode not coming into play.
To properly get mirrored tiling I think you will need to create a custom shader that scales the UV space.
You could try something like this that just leverages Unity’s magic “_ST” property and “TRANSFORM_TEX” function. So you would make a material with this shader, and then set your SpriteRenderer to Tiled while using it.
Or if that causes issues, create a shader similarly based on the default, but just add your own “Scale” property and multiply the UV by that in the Sample function.
I’m not a shader expert, there may be a better way.
Of course, you could always use a full-width sprite and tile that but I’m sure you’ve considered that.
Of course, you could always use a full-width sprite and tile that but I’m sure you’ve considered that.
Hmm, I’m not sure what you mean by this last part.
For the rest of your comment, unfortunately I don’t think I have enough technical knowledge of UV and its relationship to 2D sprites or with Shaders (I typically use Shader Graph when I want to get any fancier than default materials).