DriftTexture · function
compositeOverlay
Put the overlay over the base, channel by channel, into out.
Explained in DriftTexture.
function compositeOverlay(out: Float32Array, base: Float32Array, overlay: Float32Array, written: Uint8Array): voidimport { compositeOverlay } from '@driftengine/texture';Parameters
| Parameter | Type | Description |
|---|---|---|
out | Float32Array | |
base | Float32Array | |
overlay | Float32Array | |
written | Uint8Array |
In depth
written is a parameter because the plan's signature had no way to say which texels and
channels were touched, and without it compositing either overwrites everything — so one scorch
mark erases the base across the whole tile — or guesses from a sentinel value, which is a value
somebody eventually writes on purpose.