Table of Contents

Method Spread

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

Spread(ComputeBuffer, ComputeBuffer, Texture, float, int, bool, int, int)

Spreads each source point into a number of jittered copies and writes them to a destination buffer.

public static void Spread(ComputeBuffer sourceBuffer, ComputeBuffer destinationBuffer, Texture distanceMap, float distance, int count, bool keepSourcePoints, int seed, int baseSeed)

Parameters

sourceBuffer ComputeBuffer

The source position buffer.

destinationBuffer ComputeBuffer

The destination position buffer, sized for source count times count plus one.

distanceMap Texture

Optional map that scales the spread radius per point. Null disables the scaling.

distance float

The base spread distance in normalized units.

count int

The number of copies spread from each source point.

keepSourcePoints bool

Whether the original source points are also written to the output.

seed int

The node level seed.

baseSeed int

The graph level seed, combined with the node seed to randomize the result.

Remarks

The random seed vector consumes four sequential samples from a seeded generator in a fixed order, so the result is deterministic for a given seed pair. Large work loads are split into multiple passes with a running base index.