Skip to content

litRim(normal, viewDir?, rimColor?, rimPower?, rimStrength?): Node <"vec3">

Defined in: packages/nodes/src/lighting/lit.ts:94

Calculate rim/fresnel lighting effect. Creates a glow around edges when viewed from an angle.

Node <"vec3">

Surface normal

Vec3Input = ...

Direction to camera/viewer

Vec3Input = ...

Rim light color

FloatInput = 2

Rim falloff exponent (higher = tighter rim)

FloatInput = 1

Rim intensity multiplier

Node <"vec3">

Rim light color (vec3, add to other lighting)

const rim = litRim(normal, [0, 0, 1], [0.5, 0.8, 1], 3, 1)