Shader Graph: How do I rotate a texture that is part of a larger texture?
I've been playing around with the 2D Tilemaps and have been using Shader Graphs to "break up" the repetitive patterns that you get by reusing the same sprite for each ground tile. The way I implemented this is by using perlin noise and rotating its own texture and overlapping it using the perlin noise. After some struggles (Im new to Shader Graphs) it works great.
The problem arises when I try to apply my Shader Graph to a texture that has been imported as part of a bigger texture. This can be seen below. Unity's auto-slice correctly places the pivot in the center of each sub-texture as I want.
Rotation that is currently happening clearly shows that the rotating is placing my sampler onto a different part of the bigger texture.
The way I currently have it setup is that the rotation is done by the UV - Rotate node into the UV input on the Sample Texture 2D node. This is where things go wrong when the texture im trying to rotate is part of a bigger texture.
So the question is: How do I properly do this?
Is there anyway to rotate later on in the process after the sampling has been done?
I have thought of some work arounds, like making my big texture rotationaly symetrical or of course just importing one tile at a time. But I really want to find a proper solution that does not create some dependencies on the way my textures are formatted.
I wasn't able to find any previous anwsers to this problem by googling but it seems like it should be a fairly common problem so any links to solutions would also be greatly appreciated.
Your answer
Follow this Question
Related Questions
Trying outline with Shader Graph 2020 causes weird glitchy effect 0 Answers
Shader Graph 2D(v.2019): How can create Transparency Gradient on shader plain? 0 Answers
Cannot access render pipelines - missing from Package manager (Unity 2019.1.14f1) 1 Answer
Map a video texture on another texture? 0 Answers