DriftTexture · function
writeOverlay
Write value into one channel of every texel within radius of (u, v).
Explained in DriftTexture.
function writeOverlay(overlay: Overlay, u: number, v: number, radius: number, channel: number, value: number): numberimport { writeOverlay } from '@driftengine/texture';Parameters
| Parameter | Type | Description |
|---|---|---|
overlay | Overlay | |
u | number | |
v | number | |
radius | number | |
channel | number | |
value | number |
In depth
A disc rather than a square, because a square decal is a square nobody asked for, and the radius is in UV so a caller reasons in surface fractions rather than in whatever resolution this is.