Table of Contents

Method ThinOut

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

ThinOut(ComputeBuffer, ComputeBuffer, Texture, float, int, int)

Removes points from a set using a mask, where a blacker mask value gives a higher chance of removal.

public static void ThinOut(ComputeBuffer inputBuffer, ComputeBuffer outputBuffer, Texture maskTexture, float maskMultiplier, int seed, int baseSeed)

Parameters

inputBuffer ComputeBuffer

The source position buffer.

outputBuffer ComputeBuffer

The destination position buffer, sized to match the input.

maskTexture Texture

Optional mask that drives the removal probability. Null keeps every point.

maskMultiplier float

Scales the mask value before it is used to decide removal.

seed int

The node level seed.

baseSeed int

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

Remarks

The output buffer keeps the same instance count as the input. Removed points are flagged in place rather than compacted, so downstream consumers skip them. Large work loads are split into multiple passes with a running base index.