GradientTexture1D

继承: Texture2D < Texture < Resource < RefCounted < Object

A 1D texture that uses colors obtained from a Gradient.

描述

A 1D texture that obtains colors from a Gradient to fill the texture data. The texture is filled by sampling the gradient for each pixel. Therefore, the texture does not necessarily represent an exact copy of the gradient, as it may miss some colors if there are not enough pixels. See also GradientTexture2D, CurveTexture and CurveXYZTexture.

属性

Gradientgradient
boolresource_local_to_scene
booluse_hdr
intwidth

属性说明

Gradient gradient

The Gradient used to fill the texture.


bool use_hdr = false

  • void set_use_hdr ( value: bool )
  • bool is_using_hdr ( )

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

  • void set_width ( value: int )
  • int get_width ( )

The number of color samples that will be obtained from the Gradient.

1

本方法通常需要用户覆盖才能生效。

2

本方法无副作用,不会修改该实例的任何成员变量。

3

本方法除了能接受在此处描述的参数外,还能够继续接受任意数量的参数。

4

本方法用于构造某个类型。

5

调用本方法无需实例,可直接使用类名进行调用。

6

本方法描述的是使用本类型作为左操作数的有效运算符。

7

这个值是由下列位标志构成位掩码的整数。

8

无返回值。