Documentation / @ripl/3d / computeSpotAttenuation
Function: computeSpotAttenuation() ​
computeSpotAttenuation(
cosAngle,cosOuter,cosInner):number
Defined in: 3d/src/core/shading.ts:382
Computes the cone falloff for a spot light.
Parameters ​
| Parameter | Type | Description |
|---|---|---|
cosAngle | number | Cosine of the angle between the cone axis and the surface. |
cosOuter | number | Cosine of the cone's outer half-angle. |
cosInner | number | Cosine of the cone's inner half-angle. |
Returns ​
number
0 outside the cone, 1 inside the inner cone, smoothly interpolated between.