Table of Contents

Method RequestBiomeData

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

RequestBiomeData(IBiome, BiomeDataRequest, TerrainGraph, Bounds, Space, int, int, GraphInputContainer, BiomeDataMask, FillArgumentsHandler, GraphExecutionCache, CancellationSignal)

Executes a terrain graph for one biome request and fills the requested output channels into BiomeData.

public static IEnumerator RequestBiomeData(IBiome biome, BiomeDataRequest request, TerrainGraph graph, Bounds biomeWorldBounds, Space simSpace, int baseResolution, int seed, GraphInputContainer inputContainer = null, BiomeDataMask dataMask = (BiomeDataMask)-1, TerrainDataGraph.FillArgumentsHandler fillArgumentsCallback = null, GraphExecutionCache cache = null, CancellationSignal cancellationSignal = null)

Parameters

biome IBiome

The biome requesting data. This is used for progress reporting and for identifying the source of the generation request.

request BiomeDataRequest

The asynchronous request whose data instance will receive the generated outputs.

graph TerrainGraph

The terrain graph to execute.

biomeWorldBounds Bounds

The biome bounds that define the height scale and horizontal coverage of the graph request.

simSpace Space

The coordinate space in which the graph should evaluate its bounds. In local space the request starts at the origin; in world space it uses the biome's world minimum XZ.

baseResolution int

Base graph resolution for this request. It must already be compatible with the graph's compute-shader constraints.

seed int

Base random seed used to initialize the execution arguments.

inputContainer GraphInputContainer

Optional external graph inputs, such as Local Procedural Biome masks, scene height, custom textures, or uploaded point buffers.

dataMask BiomeDataMask

Bitmask that selects which output categories should be requested and extracted. Output nodes outside these categories are ignored for this run.

fillArgumentsCallback TerrainDataGraph.FillArgumentsHandler

Optional callback that appends extra execution arguments before the graph starts.

cache GraphExecutionCache

Optional graph execution cache owned by the caller and reused across graph executions.

cancellationSignal CancellationSignal

Optional read-only cancellation state passed to TerrainGraph.Execute. When cancellation is observed, the method waits for graph cleanup, disposes the execution handle without transferring any pooled outputs, and completes request with its existing payload unchanged.

Returns

IEnumerator

An enumerator that executes the graph asynchronously, transfers selected outputs into the request's BiomeData, and completes request when finished.

Remarks

The method first discovers the output nodes that match the requested dataMask. For some categories it also filters out nodes whose referenced templates or terrain layers are not usable.

Once execution completes, outputs are removed from data in category order and written into the request data. Removing them from the pool transfers ownership away from the execution handle so the final handle.Dispose call does not destroy them.

Cancellation is checked before output extraction. This is the ownership boundary: a cancelled execution retains and disposes every pooled output, while a successful execution transfers selected outputs to the request.

If the mask resolves to no output nodes, the request completes immediately without running the graph.

Exceptions

ArgumentException

Thrown when baseResolution is invalid for graph execution.