Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
GradientTexture1D
继承: Texture2D < Texture < Resource < RefCounted < Object
使用从 Gradient 获得的颜色的一维纹理。
描述
从 Gradient 获取颜色来填充纹理数据的一维纹理。通过为每个像素采样渐变来填充纹理。因此,该纹理不一定代表渐变的精确副本,因为如果没有足够的像素,它可能会丢失一些颜色。另见 GradientTexture2D、CurveTexture 和 CurveXYZTexture。
属性
resource_local_to_scene |
|
|
|
||
|
属性说明
用于填充纹理的 Gradient。
如果为 true
,则生成的纹理会支持高动态范围(Image.FORMAT_RGBAF 格式)。可以在 Environment.glow_enabled 为 true
时实现辉光效果。如果为 false
,则生成的纹理会使用低动态范围;过亮的颜色会被钳制(Image.FORMAT_RGBA8 格式)。
将从 Gradient 中获得的颜色样本的数量。