Table of Contents

Class CurveTexture

A 1D texture where pixel brightness corresponds to points on a curve.

Inheritance
CurveTexture

Remarks

A 1D texture where pixel brightness corresponds to points on a unit Curve resource, either in grayscale or in red. This visual representation simplifies the task of saving curves as image files.

If you need to store up to 3 curves within a single texture, use CurveXYZTexture instead. See also GradientTexture1D and GradientTexture2D.

Properties

curve

The Curve that is rendered onto the texture. Should be a unit Curve.

var curve : Curve

Property Value

Curve

Remarks

texture_mode

The format the texture should be generated with. When passing a CurveTexture as an input to a Shader, this may need to be adjusted.

var texture_mode : int = 0

Property Value

int

Remarks

  • void set_texture_mode(int value)
  • int get_texture_mode

width

The width of the texture (in pixels). Higher values make it possible to represent high-frequency data better (such as sudden direction changes), at the cost of increased generation time and memory usage.

var width : int = 256

Property Value

int

Remarks

  • void set_width(int value)
  • int get_width