Renderer · interface

SkinModel

Skin: light scattered beneath the surface, reddening its terminator and its thin parts.

Explained in Hello world.

interface SkinModel
import type { SkinModel } from '@driftengine/core';

Properties

NameTypeDescription
kindreadonly'skin'
scatterColorreadonlyVec3The colour light keeps travelling beneath the surface — the mean free path, as a colour.
radiusreadonlynumberMetres: how far light travels beneath it, on average, before it leaves — from where it entered to where it leaves, for a channel whose share of scatterColor is 1. Burley's profile, which the lit stage and the screen-space blur both scatter by, does that at a distance d two fifths of it, and carries a tail of light out to about three and a half times it.
transmissionreadonlynumber0 to 1: how much a light behind a thin part shows through it.
profilereadonlynumberWhich of up to eight profiles the screen-space scattering blurs this skin by.