Table of Contents

Method ExtractRegionMask

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

ExtractRegionMask(Texture, Bounds, Bounds, int)

Extracts the part of a source mask represented by target world bounds into a new square render texture.

public static RenderTexture ExtractRegionMask(Texture sourceMask, Bounds sourceWorldBounds, Bounds targetWorldBounds, int targetResolution)

Parameters

sourceMask Texture

Mask representing sourceWorldBounds in world XZ space.

sourceWorldBounds Bounds

World-space bounds represented by the source mask.

targetWorldBounds Bounds

World-space bounds that the returned mask should represent.

targetResolution int

Width and height of the returned mask.

Returns

RenderTexture

A created, linear RFloat render texture owned by the caller. Pixels outside the source bounds are zero.