Difference between revisions of "WrapMode"
m (Remove brackets around Image links.) |
m |
||
(10 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | How the image wraps inside a | + | How the image wraps inside a [[Quad]] with a larger quad size than image size. This also affects how [[Mesh]]es with texture coordinates which are outside the range of [0, 1] are drawn, and the color returned by the <code>Texel</code> [[Shader]] function when using it to sample from texture coordinates outside of the range of [0, 1]. |
[[File:ComparisonWraps.png]] | [[File:ComparisonWraps.png]] | ||
== Constants == | == Constants == | ||
− | ;clamp: Clamp the | + | ;clamp: Clamp the texture. Appears only once. The area outside the texture's normal range is colored based on the edge pixels of the texture. |
− | ;repeat: Repeat the | + | ;repeat: Repeat the texture. Fills the whole available extent. |
+ | {{New feature|0.9.2| | ||
+ | ;mirroredrepeat: Repeat the texture, flipping it each time it repeats. May produce better visual results than the <code>repeat</code> mode when the texture doesn't seamlessly tile.}} | ||
+ | {{New feature|0.10.0| | ||
+ | ;clampzero: Clamp the texture. Fills the area outside the texture's normal range with transparent black (or opaque black for textures with no alpha channel.)}} | ||
+ | {{New feature|12.0| | ||
+ | ;clampone: Clamp the texture. Fills the area outside the texture's normal range with opaque white.}} | ||
+ | |||
+ | == Notes == | ||
+ | The <code>clampzero</code> and <code>clampone</code> modes are not available on most mobile devices, and will fall back to the <code>clamp</code> mode when unsupported. Check the <code>clampzero</code> and <code>clampone</code> [[GraphicsFeature]] constants by calling [[love.graphics.getSupported]]. | ||
+ | |||
== See Also == | == See Also == | ||
* [[parent::love.graphics]] | * [[parent::love.graphics]] | ||
− | * [[ | + | * [[Texture:setWrap]] |
− | + | * [[Texture:getWrap]] | |
− | * [[ | ||
− | |||
[[Category:Enums]] | [[Category:Enums]] | ||
{{#set:Description=How the image wraps inside a large Quad.}} | {{#set:Description=How the image wraps inside a large Quad.}} |
Latest revision as of 14:38, 26 March 2023
How the image wraps inside a Quad with a larger quad size than image size. This also affects how Meshes with texture coordinates which are outside the range of [0, 1] are drawn, and the color returned by the Texel
Shader function when using it to sample from texture coordinates outside of the range of [0, 1].
Contents
Constants
- clamp
- Clamp the texture. Appears only once. The area outside the texture's normal range is colored based on the edge pixels of the texture.
- repeat
- Repeat the texture. Fills the whole available extent.
- mirroredrepeat
- Repeat the texture, flipping it each time it repeats. May produce better visual results than the
repeat
mode when the texture doesn't seamlessly tile.
- clampzero
- Clamp the texture. Fills the area outside the texture's normal range with transparent black (or opaque black for textures with no alpha channel.)
- clampone
- Clamp the texture. Fills the area outside the texture's normal range with opaque white.
Notes
The clampzero
and clampone
modes are not available on most mobile devices, and will fall back to the clamp
mode when unsupported. Check the clampzero
and clampone
GraphicsFeature constants by calling love.graphics.getSupported.
See Also
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info