From b5c78f3046410b71c7f51dededbe68f9a27cf119 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Fri, 10 Jun 2022 22:56:35 +0200 Subject: Document the CurveXYZTexture class, improve CurveTexture documentation --- doc/classes/CurveTexture.xml | 8 ++++++-- doc/classes/CurveXYZTexture.xml | 7 +++++++ doc/classes/GradientTexture1D.xml | 2 +- doc/classes/GradientTexture2D.xml | 2 +- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/doc/classes/CurveTexture.xml b/doc/classes/CurveTexture.xml index 6aa39e453e..85473fc237 100644 --- a/doc/classes/CurveTexture.xml +++ b/doc/classes/CurveTexture.xml @@ -5,23 +5,27 @@ Renders a given [Curve] provided to it. Simplifies the task of drawing curves and/or saving them as image files. + If you need to store up to 3 curves within a single texture, use [CurveXYZTexture] instead. See also [GradientTexture1D] and [GradientTexture2D]. - The [code]curve[/code] rendered onto the texture. + The [Curve] that is rendered onto the texture. + The format the texture should be generated with. When passing a CurveTexture as a input to a [Shader], this may need to be adjusted. - The width of the texture. + The width of the texture (in pixels). Higher values make it possible to represent high-frequency data better (such as sudden direction changes), at the cost of increased generation time and memory usage. + Store the curve equally across the red, green and blue channels. This uses more video memory, but is more compatible with shaders that only read the green and blue values. + Store the curve only in the red channel. This saves video memory, but some custom shaders may not be able to work with this. diff --git a/doc/classes/CurveXYZTexture.xml b/doc/classes/CurveXYZTexture.xml index d289e394aa..e3f2e8fc45 100644 --- a/doc/classes/CurveXYZTexture.xml +++ b/doc/classes/CurveXYZTexture.xml @@ -1,19 +1,26 @@ + A texture that shows 3 different curves (stored on the red, green and blue color channels). + Renders 3 given [Curve]s provided to it, on the red, green and blue channels respectively. Compared to using separate [CurveTexture]s, this further simplifies the task of drawing curves and/or saving them as image files. + If you only need to store one curve within a single texture, use [CurveTexture] instead. See also [GradientTexture1D] and [GradientTexture2D]. + The [Curve] that is rendered onto the texture's red channel. + The [Curve] that is rendered onto the texture's green channel. + The [Curve] that is rendered onto the texture's blue channel. + The width of the texture (in pixels). Higher values make it possible to represent high-frequency data better (such as sudden direction changes), at the cost of increased generation time and memory usage. diff --git a/doc/classes/GradientTexture1D.xml b/doc/classes/GradientTexture1D.xml index a124753a9f..3254754ac1 100644 --- a/doc/classes/GradientTexture1D.xml +++ b/doc/classes/GradientTexture1D.xml @@ -4,7 +4,7 @@ Gradient-filled texture. - GradientTexture1D uses a [Gradient] to fill the texture data. The gradient will be filled from left to right using colors obtained from the gradient. This means the texture does not necessarily represent an exact copy of the gradient, but instead an interpolation of samples obtained from the gradient at fixed steps (see [member width]). + GradientTexture1D uses a [Gradient] to fill the texture data. The gradient will be filled from left to right using colors obtained from the gradient. This means the texture does not necessarily represent an exact copy of the gradient, but instead an interpolation of samples obtained from the gradient at fixed steps (see [member width]). See also [GradientTexture2D], [CurveTexture] and [CurveXYZTexture]. diff --git a/doc/classes/GradientTexture2D.xml b/doc/classes/GradientTexture2D.xml index 4362578932..7561f1b947 100644 --- a/doc/classes/GradientTexture2D.xml +++ b/doc/classes/GradientTexture2D.xml @@ -4,7 +4,7 @@ Gradient-filled 2D texture. - The texture uses a [Gradient] to fill the texture data in 2D space. The gradient is filled according to the specified [member fill] and [member repeat] types using colors obtained from the gradient. The texture does not necessarily represent an exact copy of the gradient, but instead an interpolation of samples obtained from the gradient at fixed steps (see [member width] and [member height]). + The texture uses a [Gradient] to fill the texture data in 2D space. The gradient is filled according to the specified [member fill] and [member repeat] types using colors obtained from the gradient. The texture does not necessarily represent an exact copy of the gradient, but instead an interpolation of samples obtained from the gradient at fixed steps (see [member width] and [member height]). See also [GradientTexture1D], [CurveTexture] and [CurveXYZTexture]. -- cgit v1.2.3