Merge pull request #103012 from KoBeWi/far_textures
Better explain texture repeat
This commit is contained in:
commit
2d8e408e7e
@ -644,7 +644,8 @@
|
|||||||
The filtering mode used to render this [CanvasItem]'s texture(s).
|
The filtering mode used to render this [CanvasItem]'s texture(s).
|
||||||
</member>
|
</member>
|
||||||
<member name="texture_repeat" type="int" setter="set_texture_repeat" getter="get_texture_repeat" enum="CanvasItem.TextureRepeat" default="0">
|
<member name="texture_repeat" type="int" setter="set_texture_repeat" getter="get_texture_repeat" enum="CanvasItem.TextureRepeat" default="0">
|
||||||
The repeating mode used to render this [CanvasItem]'s texture(s).
|
The repeating mode used to render this [CanvasItem]'s texture(s). It affects what happens when the texture is sampled outside its extents, for example by setting a [member Sprite2D.region_rect] that is larger than the texture or assigning [Polygon2D] UV points outside the texture.
|
||||||
|
[b]Note:[/b] [TextureRect] is not affected by [member texture_repeat], as it uses its own texture repeating implementation.
|
||||||
</member>
|
</member>
|
||||||
<member name="top_level" type="bool" setter="set_as_top_level" getter="is_set_as_top_level" default="false">
|
<member name="top_level" type="bool" setter="set_as_top_level" getter="is_set_as_top_level" default="false">
|
||||||
If [code]true[/code], this [CanvasItem] will [i]not[/i] inherit its transform from parent [CanvasItem]s. Its draw order will also be changed to make it draw on top of other [CanvasItem]s that do not have [member top_level] set to [code]true[/code]. The [CanvasItem] will effectively act as if it was placed as a child of a bare [Node].
|
If [code]true[/code], this [CanvasItem] will [i]not[/i] inherit its transform from parent [CanvasItem]s. Its draw order will also be changed to make it draw on top of other [CanvasItem]s that do not have [member top_level] set to [code]true[/code]. The [CanvasItem] will effectively act as if it was placed as a child of a bare [Node].
|
||||||
@ -754,7 +755,7 @@
|
|||||||
The [CanvasItem] will inherit the filter from its parent.
|
The [CanvasItem] will inherit the filter from its parent.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="TEXTURE_REPEAT_DISABLED" value="1" enum="TextureRepeat">
|
<constant name="TEXTURE_REPEAT_DISABLED" value="1" enum="TextureRepeat">
|
||||||
The texture does not repeat.
|
The texture does not repeat. Sampling the texture outside its extents will result in "stretching" of the edge pixels. You can avoid this by ensuring a 1-pixel fully transparent border on each side of the texture.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="TEXTURE_REPEAT_ENABLED" value="2" enum="TextureRepeat">
|
<constant name="TEXTURE_REPEAT_ENABLED" value="2" enum="TextureRepeat">
|
||||||
The texture repeats when exceeding the texture's size.
|
The texture repeats when exceeding the texture's size.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user