Table of Contents

Method TextureFromFloats

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

TextureFromFloats(float[], int, int)

Creates an UnityEngine.TextureFormat.RFloat texture from a linear array of scalar values.

public static Texture2D TextureFromFloats(float[] data, int width, int height)

Parameters

data float[]

Source float data in row-major order.

width int

Texture width.

height int

Texture height.

Returns

Texture2D

A clamp-wrapped bilinear-filtered floating-point texture containing the supplied values.

Exceptions

ArgumentNullException

Thrown when data is null.

ArgumentException

Thrown when the dimensions are invalid or do not match the data length.