Table of Contents

Class GradientTexture1D

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

Inheritance
GradientTexture1D

Remarks

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.

Properties

gradient

The Gradient used to fill the texture.

var gradient : Gradient

Property Value

Gradient

Remarks

use_hdr

If true, the generated texture will support high dynamic range (Image.FORMAT_RGBAF format). This allows for glow effects to work if glow_enabled is true. If false, the generated texture will use low dynamic range; overbright colors will be clamped (Image.FORMAT_RGBA8 format).

var use_hdr : bool = false

Property Value

bool

Remarks

  • void set_use_hdr(bool value)
  • bool is_using_hdr

width

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

var width : int = 256

Property Value

int

Remarks

  • void set_width(int value)
  • int get_width