Table of Contents

Method Remap

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

Remap(RenderTexture, Texture, float, float)

Remaps the normalized values of an input texture into a caller-defined output range.

public static void Remap(RenderTexture targetRT, Texture inputTexture, float outMin, float outMax)

Parameters

targetRT RenderTexture

The destination render texture that receives the remapped result.

inputTexture Texture

The source texture whose values should be scanned and remapped.

outMin float

The minimum value of the destination range.

outMax float

The maximum value of the destination range.

Remarks

For most textures, the method first runs a compute shader that scans the source texture for integer-encoded min and max values, then converts those values back into normalized floats by dividing by int.MaxValue. The fullscreen remap shader uses that scanned input range to stretch or compress the data into the requested output range. When inputTexture is UnityEngine.Texture2D.blackTexture, the input range is treated as zero-to-zero and the scan step is skipped.