Type:TextureWrapMode: Difference between revisions

From Resonite Wiki
Created page
 
Explain MirrorOnce, add Unity link
 
Line 5: Line 5:
* Repeat: The texture simply repeats to fill the space.
* Repeat: The texture simply repeats to fill the space.
* Clamp: The edges of the texture will be stretched to fill the space.
* Clamp: The edges of the texture will be stretched to fill the space.
* Mirror: the texture is repeated and mirrored to fill the space.
* Mirror: The texture is repeated and mirrored to fill the space.
* MirrorOnce: (needs more info)
* MirrorOnce: The texture is mirrored once around the zero coordinate, coordinates outside [-1..1] are clamped to edge.
 
== See also ==
 
* [https://docs.unity3d.com/ScriptReference/TextureWrapMode.html TextureWrapMode in the Unity Scripting Reference]

Latest revision as of 19:05, 11 February 2024

TextureWrapMode is a data type used by StaticTexture2D. It determines how the texture is mapped when it is applied to a Material and scaled.

TextureWrapMode has 4 options on both the U and V axis.

  • Repeat: The texture simply repeats to fill the space.
  • Clamp: The edges of the texture will be stretched to fill the space.
  • Mirror: The texture is repeated and mirrored to fill the space.
  • MirrorOnce: The texture is mirrored once around the zero coordinate, coordinates outside [-1..1] are clamped to edge.

See also