Document CanvasItem's texture filtering and repeating modes
This makes the CanvasItem documentation 100% complete.
This commit is contained in:
parent
00949f0c5f
commit
3a79f98be7
|
@ -608,8 +608,10 @@
|
||||||
If [code]true[/code], the object draws on top of its parent.
|
If [code]true[/code], the object draws on top of its parent.
|
||||||
</member>
|
</member>
|
||||||
<member name="texture_filter" type="int" setter="set_texture_filter" getter="get_texture_filter" enum="CanvasItem.TextureFilter" default="0">
|
<member name="texture_filter" type="int" setter="set_texture_filter" getter="get_texture_filter" enum="CanvasItem.TextureFilter" default="0">
|
||||||
|
The texture filtering mode to use on this [CanvasItem].
|
||||||
</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 texture repeating mode to use on this [CanvasItem].
|
||||||
</member>
|
</member>
|
||||||
<member name="use_parent_material" type="bool" setter="set_use_parent_material" getter="get_use_parent_material" default="false">
|
<member name="use_parent_material" type="bool" setter="set_use_parent_material" getter="get_use_parent_material" default="false">
|
||||||
If [code]true[/code], the parent [CanvasItem]'s [member material] property is used as this one's material.
|
If [code]true[/code], the parent [CanvasItem]'s [member material] property is used as this one's material.
|
||||||
|
@ -666,12 +668,18 @@
|
||||||
The texture filter blends between the nearest four pixels. Use this for most cases where you want to avoid a pixelated style.
|
The texture filter blends between the nearest four pixels. Use this for most cases where you want to avoid a pixelated style.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="TEXTURE_FILTER_NEAREST_WITH_MIPMAPS" value="3" enum="TextureFilter">
|
<constant name="TEXTURE_FILTER_NEAREST_WITH_MIPMAPS" value="3" enum="TextureFilter">
|
||||||
|
The texture filter reads from the nearest pixel in the nearest mipmap. This is the fastest way to read from textures with mipmaps.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="TEXTURE_FILTER_LINEAR_WITH_MIPMAPS" value="4" enum="TextureFilter">
|
<constant name="TEXTURE_FILTER_LINEAR_WITH_MIPMAPS" value="4" enum="TextureFilter">
|
||||||
|
The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps. Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to [Camera2D] zoom), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC" value="5" enum="TextureFilter">
|
<constant name="TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC" value="5" enum="TextureFilter">
|
||||||
|
The texture filter reads from the nearest pixel, but selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera.
|
||||||
|
[b]Note:[/b] This texture filter is rarely useful in 2D projects. [constant TEXTURE_FILTER_NEAREST_WITH_MIPMAPS] is usually more appropriate.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC" value="6" enum="TextureFilter">
|
<constant name="TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC" value="6" enum="TextureFilter">
|
||||||
|
The texture filter blends between the nearest 4 pixels and selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. This is the slowest of the filtering options, but results in the highest quality texturing.
|
||||||
|
[b]Note:[/b] This texture filter is rarely useful in 2D projects. [constant TEXTURE_FILTER_LINEAR_WITH_MIPMAPS] is usually more appropriate.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="TEXTURE_FILTER_MAX" value="7" enum="TextureFilter">
|
<constant name="TEXTURE_FILTER_MAX" value="7" enum="TextureFilter">
|
||||||
Represents the size of the [enum TextureFilter] enum.
|
Represents the size of the [enum TextureFilter] enum.
|
||||||
|
|
Loading…
Reference in New Issue