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)

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, TerrainGraph.FillArgumentsHandler fillArgumentsCallback = null)

Parameters

biome IBiome

The biome requesting data. This is used for editor 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 TerrainGraph.FillArgumentsHandler

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

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.

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.