summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-02-01 13:39:16 +0100
committerGitHub <noreply@github.com>2022-02-01 13:39:16 +0100
commitdafadd73ac133308a2ea1cfcd3a85e22a1a1a0aa (patch)
tree04d1eb07f7c6b102d2350780d6c402bc4867c2ea
parent473f681651e5a4859d6e4c4a3cef2d5aa3d736e6 (diff)
parentb4f0d4c7db295158ddf35bad770a2c9d976013a6 (diff)
Merge pull request #57375 from Calinou/gradienttexture-curvetexture-decrease-default-size
-rw-r--r--doc/classes/CurveTexture.xml2
-rw-r--r--doc/classes/CurveXYZTexture.xml2
-rw-r--r--doc/classes/GradientTexture1D.xml2
-rw-r--r--scene/resources/texture.h6
4 files changed, 6 insertions, 6 deletions
diff --git a/doc/classes/CurveTexture.xml b/doc/classes/CurveTexture.xml
index fe75f029f0..99b5ef2f4f 100644
--- a/doc/classes/CurveTexture.xml
+++ b/doc/classes/CurveTexture.xml
@@ -14,7 +14,7 @@
</member>
<member name="texture_mode" type="int" setter="set_texture_mode" getter="get_texture_mode" enum="CurveTexture.TextureMode" default="0">
</member>
- <member name="width" type="int" setter="set_width" getter="get_width" default="2048">
+ <member name="width" type="int" setter="set_width" getter="get_width" default="256">
The width of the texture.
</member>
</members>
diff --git a/doc/classes/CurveXYZTexture.xml b/doc/classes/CurveXYZTexture.xml
index 815653e987..b6dd90c7d3 100644
--- a/doc/classes/CurveXYZTexture.xml
+++ b/doc/classes/CurveXYZTexture.xml
@@ -13,7 +13,7 @@
</member>
<member name="curve_z" type="Curve" setter="set_curve_z" getter="get_curve_z">
</member>
- <member name="width" type="int" setter="set_width" getter="get_width" default="2048">
+ <member name="width" type="int" setter="set_width" getter="get_width" default="256">
</member>
</members>
</class>
diff --git a/doc/classes/GradientTexture1D.xml b/doc/classes/GradientTexture1D.xml
index 223439956c..4730410ea9 100644
--- a/doc/classes/GradientTexture1D.xml
+++ b/doc/classes/GradientTexture1D.xml
@@ -15,7 +15,7 @@
<member name="use_hdr" type="bool" setter="set_use_hdr" getter="is_using_hdr" default="false">
If [code]true[/code], the generated texture will support high dynamic range ([constant Image.FORMAT_RGBAF] format). This allows for glow effects to work if [member Environment.glow_enabled] is [code]true[/code]. If [code]false[/code], the generated texture will use low dynamic range; overbright colors will be clamped ([constant Image.FORMAT_RGBA8] format).
</member>
- <member name="width" type="int" setter="set_width" getter="get_width" default="2048">
+ <member name="width" type="int" setter="set_width" getter="get_width" default="256">
The number of color samples that will be obtained from the [Gradient].
</member>
</members>
diff --git a/scene/resources/texture.h b/scene/resources/texture.h
index c3f29ad417..8075497c42 100644
--- a/scene/resources/texture.h
+++ b/scene/resources/texture.h
@@ -595,7 +595,7 @@ public:
private:
mutable RID _texture;
Ref<Curve> _curve;
- int _width = 2048;
+ int _width = 256;
int _current_width = 0;
TextureMode texture_mode = TEXTURE_MODE_RGB;
TextureMode _current_texture_mode = TEXTURE_MODE_RGB;
@@ -637,7 +637,7 @@ private:
Ref<Curve> _curve_x;
Ref<Curve> _curve_y;
Ref<Curve> _curve_z;
- int _width = 2048;
+ int _width = 256;
int _current_width = 0;
void _update();
@@ -685,7 +685,7 @@ private:
Ref<Gradient> gradient;
bool update_pending = false;
RID texture;
- int width = 2048;
+ int width = 256;
bool use_hdr = false;
void _queue_update();