Table of Contents

Method FloatsFromTexture

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

FloatsFromTexture(Texture2D)

Extracts the red channel of an UnityEngine.TextureFormat.RFloat texture into a float array.

public static float[] FloatsFromTexture(Texture2D tex)

Parameters

tex Texture2D

Source texture.

Returns

float[]

A float array containing one scalar per pixel.

Exceptions

ArgumentNullException

Thrown when tex is null.

ArgumentException

Thrown when the texture format is not UnityEngine.TextureFormat.RFloat.