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): number
import { writeOverlay } from '@driftengine/texture';

Parameters

ParameterTypeDescription
overlayOverlay
unumber
vnumber
radiusnumber
channelnumber
valuenumber

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.