Table of Contents

Method TextureFromCurve

Namespace
Pinwheel.Vista
Assembly
Pinwheel.Vista.Runtime.dll

TextureFromCurve(AnimationCurve, int)

Bakes an UnityEngine.AnimationCurve into a one-dimensional floating-point texture.

public static Texture2D TextureFromCurve(AnimationCurve curve, int resolution = 2048)

Parameters

curve AnimationCurve

Curve to sample from left to right.

resolution int

Number of texels to generate.

Returns

Texture2D

A clamp-wrapped bilinear-filtered UnityEngine.Texture2D containing sampled curve values in all color channels.