I followed the UE4 tutorials on the paper 2d project. There is a part where he shows you how to have a material repeat. I made my own texture to try this out and I have one problem. My texture has a certain position it needs to be in and when I follow the tutorial my texture is upside down. Other than that it works fine. I am unsure on how to flip the texture in that noding.
You could add a Texture Coordinate node and wire it into the Texture Sample. If you then change the UTiling/VTiling on the texture coordinate node you can flip the texture along the x/y axis respectively. However this is rather performance heavy. If youâre trying to optimize performance your best bet would be to edit the texture directly in another program (Photoshop for instance).
I just encountered this issue as well. For anyone else reading this the solution I found was to use the âOneMinusâ node on the product of the value derived from the absolute world position and plug the result of that into the texture sample instead. This is needed as UV inputs gradient from right to left, and from bottom to top, which is why the texture appears upside down. Subtracting the value from 1.0 reorders the values from left to right, and top to bottom, as you would expect.
Why not just fix the coordinate system? Take the connection between the product of the AbsoluteWorldPosition node and the TextureSample (in my case, SpriteTexture), and add a second multiplication to a constant Vector2 of value (1,-1). This effectively flips the inverted vertical coordinate-system back to upright.
If you need to flip (mirror) any texture, you just need textcoords and a constant2 node (-1, 1 or 1, -1) going into a multiply node and itâll flip either horizontally or vertically
which axis you want to flip,which axis you should multiply the value â-1â,keep other axis unchange,if you make all axis multiply the value"-1",the operation means that the coordinates is rotated,you can identify these phenomena in photoshop with your pencil,itâs just mathematical fundation.