From 3a79f98be7800ee4490ba7d1365fe3d66cb6f2f6 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Fri, 15 May 2020 14:49:43 +0200 Subject: Document CanvasItem's texture filtering and repeating modes This makes the CanvasItem documentation 100% complete. --- doc/classes/CanvasItem.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml index 38e4453cf2..b3a3722836 100644 --- a/doc/classes/CanvasItem.xml +++ b/doc/classes/CanvasItem.xml @@ -608,8 +608,10 @@ If [code]true[/code], the object draws on top of its parent. + The texture filtering mode to use on this [CanvasItem]. + The texture repeating mode to use on this [CanvasItem]. 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 reads from the nearest pixel in the nearest mipmap. This is the fastest way to read from textures with mipmaps. + 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. + 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. + 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. Represents the size of the [enum TextureFilter] enum. -- cgit v1.2.3