Skip to content

Documentation / @ripl/3d / computeFaceBrightness

Function: computeFaceBrightness() ​

computeFaceBrightness(normal, lightDirection, normalized?): number

Defined in: 3d/src/shading.ts:34

Computes a 0–1 brightness value for a face given its normal and a light direction.

Parameters ​

ParameterType
normalVector3
lightDirectionVector3
normalized?boolean

Returns ​

number