Work in progress
Godot documentation is being updated to reflect the latest changes in version
4.0
. Some documentation pages may
still state outdated information. This banner will tell you if you're reading one of such pages.
The contents of this page are up to date. If you can still find outdated information, please open an issue.
GradientTexture1D¶
Inherits: Texture2D < Texture < Resource < RefCounted < Object
Gradient-filled texture.
Description¶
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 width). See also GradientTexture2D, CurveTexture and CurveXYZTexture.
Properties¶
resource_local_to_scene |
|
|
|
||
|
Property Descriptions¶
Gradient gradient
The Gradient that will be used to fill the texture.
bool use_hdr = false
If true
, the generated texture will support high dynamic range (Image.FORMAT_RGBAF format). This allows for glow effects to work if Environment.glow_enabled is true
. If false
, the generated texture will use low dynamic range; overbright colors will be clamped (Image.FORMAT_RGBA8 format).
int width = 256
The number of color samples that will be obtained from the Gradient.