DriftTexture · function
toksvigRoughness
How much roughness a shortened average normal implies.
Explained in DriftTexture.
function toksvigRoughness(normalLength: number, roughness: number): numberimport { toksvigRoughness } from '@driftengine/texture';Parameters
| Parameter | Type | Description |
|---|---|---|
normalLength | number | |
roughness | number |
In depth
The averaged normal's length falls as the normals it averaged disagree, so 1 - length is a
direct measure of the variance lost to averaging. Added in variance rather than in roughness,
because variances of independent sources add and roughnesses do not.